Forums › English Language Forums › General › General Discussion

Search

Resolve lag spikes, proven: TcpAckFrequency Tutorial

13 replies [Last post]
Thu, 05/26/2011 - 00:45
sawa0122
Legacy Username

**delete this if its already old, or move it if its the wrong session**
I've come across several people with lag spike problems without knowing that the game should be smoother than what they're already adapted to.
some cases, not all, proven this method to work.
it is safe, works for XP and 7 with slightly different procedures, and its been widely used in many other MMOs, best known for Mabinogi.

so here's the trick: TcpAckFrequency

youtube tutorial:
http://youtu.be/XbWQnvytvqk

whether this does or does not make a difference please share the result, cuz i assume everyone wants to know too. again, if its already been discussed then shut the thread.

Thu, 05/26/2011 - 00:49
#1
Shoebox's picture
Shoebox
The game uses UDP, so this

The game uses UDP, so this wouldn't really do anything.

Thu, 05/26/2011 - 00:58
#2
sawa0122
Legacy Username
that's what i thought, but

that's what i thought, but i'm not certain cuz i did see somewhat results in some cases

Thu, 05/26/2011 - 02:04
#3
Kaybol
Legacy Username
How does one measure whether

How does one measure whether this actually has any effect? I don't like going by "it seems better in some cases".

Thu, 05/26/2011 - 02:40
#4
sawa0122
Legacy Username
the lag spike problem that

the lag spike problem that pin points at is the case of a
1) constant 1~3 sec delay of actual dmg showing after the sword swing animation, or usual dmg taken before the animation shown
2) minor but frequent rubberbanding

the result is that the light but constant lag disappears. yet if its due to location or poor connectivity in general then this method may not apply. i'm not knowledgeable in computer or networking so i can't provide too much detail, which i hope if anyone else know better could share a piece of advise.

to know optimal performance of the game, one way is to watch some high def gameplay footage and see what other's machine normally do.

Thu, 05/26/2011 - 02:49
#5
Kaybol
Legacy Username
Yeah ok... there's most

Yeah ok... there's most likely going to be a bunch of people posting after me that they've changed their settings and it's obviously better, but I'm not going to change some obscure Windows Registry setting and try to observe subjectively whether this had any effect.

Thu, 05/26/2011 - 03:41
#6
Betrael's picture
Betrael
here's microsoft's

here's microsoft's explanation;

TcpAckFrequency determines the number of TCP acknowledgments (ACKs) that will be outstanding before the delayed ACK timer is ignored.

TCP uses delayed acknowledgments to reduce the number of packets that are sent on the media. Instead of sending an acknowledgment for each TCP segment received, TCP in Windows 2000 and later takes a common approach to implementing delayed acknowledgments. As data is received by TCP on a particular connection, it sends an acknowledgment back only if one of the following conditions is true:

No acknowledgment was sent for the previous segment received.
A segment is received, but no other segment arrives within 200 milliseconds for that connection.

Typically, an acknowledgment is sent for every other TCP segment that is received on a connection unless the delayed ACK timer (200 milliseconds) expires. You can adjust the delayed ACK timer by editing the following registry entry.
Description: Specifies the number of ACKs that will be outstanding before the delayed ACK timer is ignored

If you set the value to 1, every packet is acknowledged immediately because there is only one outstanding TCP ACK as a segment is just received. The value of 0 (zero) is not valid and is treated as the default, 2. The only time the ACK number is 0 is when a segment is not received and the host is not going to acknowledge the data.

-----
^Keep in mind, that doesn't really work for windows 7^
http://www.speedguide.net/articles/windows-7-vista-2008-tweaks-2574

Thu, 05/26/2011 - 03:44
#7
Shoebox's picture
Shoebox
It's irrelevant, since we use

It's irrelevant, since we use UDP for the latency-sensitive bits (that is, the actual gameplay, as opposed to things like chat).

As a note, we don't officially condone editing your registry settings manually. Do so at your own risk! Changing the window size is generally safe, though. ~ Andrzej

Thu, 05/26/2011 - 04:59
#8
sawa0122
Legacy Username
the game is UDP but doesn't

the game is UDP but doesn't TCP affect the latency between the router and player's machine? would that be the reason why some cases help?

Thu, 05/26/2011 - 05:27
#9
Bigindian
only one of the devs can tell

only one of the devs can tell for sure, I'd suggest someone recording the problem and uploading to youtube, then submit it to the appropriate sub forum... maybe this way the problem can be solved in upcoming patches...

Thu, 05/26/2011 - 05:33
#10
Etendue's picture
Etendue
I've been experiencing worse

I've been experiencing worse and worse lag lately.

For instance, today:

1. I teleported into a group of enemies twice
2. When I hit things, the numbers pop up a second later
3. When I shoot my guns, they make the firing animation... with the projectiles flying 2 seconds later or not at all
4. I CANNOT SHIELD without predicting my enemies' actions, as I shield 1 second after 1 press X. This got me killed numerous times, including from jellies. Did you hear that? I got killed by JELLIES!!?!?

Funny thing is, the lag really just started being bad in the past couple of weeks. After launch, Spiral Knights had very little lag. Now? I get killed three times per floor, often by monsters which didn't even give off their attack warning.

Thu, 05/26/2011 - 08:04
#11
Algol-Sixty's picture
Algol-Sixty
the game is UDP but doesn't

the game is UDP but doesn't TCP affect the latency between the router and player's machine? would that be the reason why some cases help?
no.

UDP and TCP are two of many different low-level internet protocols. If the game uses UDP (it should), then nothing that is done with TCP will have an impact on it. (Well, booching your TCP settings could cause your connection to fill up if you are using TCP for other things at the same time.)

Even if the game was using TCP, changing the Ack frequency would likely have zero impact since every time you send a packet back to the server, it does an automatic ACk at the same time. The only time this tweak makes any difference are for things like downloading large files where all the traffic is in one direction.

I know it is fun to tweak stuff, but honestly, you are almost always better off leaving things with the defaults. There are a lot of smart people who have thought through these things and understand the ramifications.

Thu, 05/26/2011 - 08:42
#12
Dogrock's picture
Dogrock
It is also worth noting that

It is also worth noting that if using a wireless router it has its own Ack Timing setting. Though the only really effective use of this is to limit the usable range of a wireless network.

The connection between a user's computer and in home access point should add a negligible about of lag. Even a properly functioning wireless should only add about 10 to 20ms and be consistent (it can be lower). Those on a wired connection should see 1ms or less lag generated by in house components.

Thu, 05/26/2011 - 09:35
#13
mirrorminx
Legacy Username
Subjective Lag Testing = Hard

Unfortunately, at least for me, some of the lag is based to some degree on how long the Java has been running, perhaps because of memory leaks in the code, and so I can't subjectively test what effect this will have on my play experience, as any two sessions can have very different lag.

Powered by Drupal, an open source content management system