Mabinogi Guru

Navbar Left Navbar Right

Mabinogi Guru Forums » Mabinogi » Guides Library » Guide Submission Hall » Improve Your Lag, Disable The Nagle Algorithm

Reply
Old 04-07-2008, 03:09 PM   #1 (permalink)
Chasing After the Big Chickens
 
Join Date: Mar 2008
Posts: 82
Server: Mari
Gold: 4,072
darkmgl will become famous soon enoughdarkmgl will become famous soon enoughdarkmgl will become famous soon enough
Default Improve Your Lag, Disable The Nagle Algorithm

Just a slight warning, please be careful editing your registry. DO NOT change any values you are unsure of. Just creating this value and setting it will not cause any harm, but messing with other things could.

There are no side effects to this fix other then a slight increase in how much data is sent. It is negligible if you are on any sort of broadband connection.

This is not a joke. I have been suffering from major lag for a long time, and I have FOUND the problem.

The issue is something known as the "Nagle Algorithm". Anyways I'll keep it simple, this algorithm was created years ago as a way of allowing a steady stream of data to use low bandwidth. It was designed for older dial up modems to prevent online games and other things sending large numbers of small packets from filling up your entire bandwidth sending "ACK Packets". What this does is automatically delay your computer from responding to a single packet by 200ms which allows your computer to respond to multiple packets at once using less bandwidth. What this essentially does, is add up to 200ms to your lag. If you want to know more, do some googling; I don't want to bore you.

Anyways, if you are on a modern broadband connection, you can DRASTICALLY improve your Mabinogi lag by disabling this algorithm. I am unsure of how to do this in Windows Vista, but in Windows XP it is a simple registry edit.

1. Run Regedit
2. Browse to HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\Tcpip\Parameter s\Interfaces\
3. It gets tricky here, there be a bunch of Folders with letters and numbers under this Key, you need to find the one that is your network adapter. Browse them one at a time and look for the ones with similar settings to your network, such as if you have an IP address or a Gateway manually set. If you are unsure, you could always just try adding the line to all of them.
4. Add a DWORD named TcpAckFrequency This is Case Sensitive. If it is already there, skip to step 5.
5. Set the Value of the DWORD to 1
6. Reboot your PC

After this, the Nagle Algorithm will be disabled.

Bakuryu made this image guide to help people who are having trouble:


If you wish to test your lag, the best way to do it is by casting the Healing spell. Try casting all 5 charges of your healing spell before this fix, then after. I guarantee you'll cast them twice as fast after this fix if you have had lag issues or are living on the east coast.

For more information read: The TCPIP nagle algorithm can slow down network | Network | Smallvoid.com

I was ready to quit this game due to lag issues until I found this. Now all of my problems have completely gone away.

PS, this fix requires Windows XP Service Pack 2. I'm told this fix also works for Vista if you have the hotfix or SP1 listed in the article.

This fix has a drastic effect, much greater then TCP Optimizer. Please share if it was helpful to you!

If you need the Vista hotfix, you may find direct links here:
mattgadient.com » Blog Archive » KB935458 v2 - Vista hotfix for TcpAckFrequency
If you have already autoupdated Vista with all fixes, you most likely have this fix included anyways. If you do it manually, you will need to use the standalone update installer, I am not familiar with it. I'm not much use about Vista as I don't know it as well, just what I've heard from others.

IF YOU HAVE ISSUES - If you think your computer is having any issues after doing this modification, you can simply go back to where you added "TcpAckFrequency" and delete it. Just make sure you don't touch anything besides what you have added from this guide . After another reboot, your system will be back to how it was.

Last edited by kitaek27; 10-25-2008 at 12:54 PM.
darkmgl is offline   Reply With Quote
Old 04-07-2008, 04:00 PM   #2 (permalink)
If it ain't got borders
 
Bakuryu's Avatar
 
Join Date: Feb 2008
Posts: 1,936
Server: Ruairi - NA
Gold: 19,675
Bakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of light
Default

im gonna try this, thanks.


something else you can do to dramastically improve your lag is changing your MTU, check SpeedGuide.net :: Broadband · Cable · DSL · VoIP · Security · Network Tools.
i find that MTU 368 is the best working for mabinogi



EDIT: omg this works great, THANKS A LOT!

+rep
__________________


Last edited by Bakuryu; 04-07-2008 at 04:12 PM.
Bakuryu is offline   Reply With Quote
Old 04-07-2008, 04:14 PM   #3 (permalink)
Chasing After the Big Chickens
 
Join Date: Mar 2008
Posts: 82
Server: Mari
Gold: 4,072
darkmgl will become famous soon enoughdarkmgl will become famous soon enoughdarkmgl will become famous soon enough
Default

Are you on broadband with that MTU? Generally turning your MTU down below 1500 for Cable, 1492 for DSL, or I think its 546 for dial up will drastically reduce your internet speed. It doesn't screw with your download speed at all?

The Nagle change will only have an effect in gaming, all it does is allow you to send new packets before the server responds that it has finished receiving the old packets. Normally it is:

Packet A goes to Server
Server Gets Packet A
You Queue Packet B
You Queue Packet C
Server Acknowledges Packet A was received
Packet B and C are sent


After:

Packet A Goes to Sever
Server Gets Packet A
Packet B Goes to Server
Packet C Goes to Server
Server Acknowledges Packet A was received
Server Acknowleges Packet B was received
Server Acknowledges Packet C was received

Obviously this means you send alot more packets and receive alot more packets cause you are not bundling them up, but it also removes the "waiting" for the server to respond before you send data. Largest effects are noticed from a distance so far, particularly on the East Coast. If you are on the West Coast, you may not notice a difference from doing this since your RTT is so small anyways.

Last edited by darkmgl; 04-07-2008 at 04:18 PM.
darkmgl is offline   Reply With Quote
Old 04-07-2008, 04:18 PM   #4 (permalink)
If it ain't got borders
 
Bakuryu's Avatar
 
Join Date: Feb 2008
Posts: 1,936
Server: Ruairi - NA
Gold: 19,675
Bakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of light
Default

I do download slower and webpages load slower, BUT mabinogi runs A LOT better.
__________________


Last edited by Bakuryu; 03-20-2010 at 03:37 PM.
Bakuryu is offline   Reply With Quote
Old 04-07-2008, 04:19 PM   #5 (permalink)
Chasing After the Big Chickens
 
Join Date: Mar 2008
Posts: 82
Server: Mari
Gold: 4,072
darkmgl will become famous soon enoughdarkmgl will become famous soon enoughdarkmgl will become famous soon enough
Default

Hmmm its possible that by shrinking your MTU so much it is having the same effect as this fix. MTU is the maximum size of a packet, with it set so low it may be forcing your computer to not group up the packets since they get too large then .

Dunno though, just a guess. Can't think of any other reason it'd make a difference unless you're on dial up.
darkmgl is offline   Reply With Quote
Old 04-07-2008, 04:23 PM   #6 (permalink)
If it ain't got borders
 
Bakuryu's Avatar
 
Join Date: Feb 2008
Posts: 1,936
Server: Ruairi - NA
Gold: 19,675
Bakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of lightBakuryu is a glorious beacon of light
Default

doing both is improve+improve=great improve. so
yay
__________________

Bakuryu is offline   Reply With Quote
Old 04-07-2008, 07:07 PM   #7 (permalink)
Went Fishing at Sea
 
Join Date: Mar 2008
Posts: 221
Server: Mari
Gold: 3,739
HumanShield will become famous soon enoughHumanShield will become famous soon enough
Default

Thank you very much!!

Just a report: I live in LA and I'm about 30 miles away from nexon HQ , still I can tell my lag improved by a lot.
__________________
Mari Server
Insertcoin (Human) ,Elvencoin ,Giantcoin

Saving your bandwidth by not including a sig pic.
HumanShield is offline   Reply With Quote
Old 04-07-2008, 07:17 PM   #8 (permalink)
Chasing After the Big Chickens
 
Join Date: Mar 2008
Posts: 82
Server: Mari
Gold: 4,072
darkmgl will become famous soon enoughdarkmgl will become famous soon enoughdarkmgl will become famous soon enough
Default

Glad to hear it helps there too . I've been getting tons of thanks in and out of game already for it. I really hope it improves peoples' gameplay.
darkmgl is offline   Reply With Quote
Old 04-07-2008, 07:37 PM   #9 (permalink)
nom nom blood
 
kitaek27's Avatar
 
Join Date: Feb 2008
Posts: 9,193
Server: Mari
Gold: 147,465
kitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud ofkitaek27 has much to be proud of
Heavy Weapons GuyHeavy Weapons GuyHeavy Weapons GuyHeavy Weapons Guy
9Smiling JackThe Soku Badge: [03-08-2010] - Private
Send a message via AIM to kitaek27 Send a message via MSN to kitaek27
Default

The program TCP Optimizer also works similarly but instead just has you turn it on like a regular program.

It takes a bit of ram though.
__________________


Currently the best thing on the internet: http://www.nicovideo.jp/watch/sm10111236
kitaek27 is offline   Reply With Quote
Old 04-07-2008, 08:01 PM   #10 (permalink)
Welcoming Committee
 
Saiyumi's Avatar
 
Join Date: Jan 2008
Posts: 463
Server: Ruairi
Gold: 5,346
Saiyumi is following the right track
Send a message via MSN to Saiyumi
Default

Thanks again, it works great ^^
__________________
IGN: Sayumi @ Ruairi
Saiyumi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 03:19 PM.


subscribe & remove ads
Powered by vBulletin diablo 3 dragon nest
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 RC1
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
subscribe &
remove ads
no new posts