Strange lag behaviour

by Morik

Back to Mechanic's Corner.

Morik2006-03-15 11:48:40
Hiya,

This topic is going to be technical. I'm not going to explain it to people who ask, so please don't. I'm hoping there's a few fellow geeks out there who can help me figure this all out.

Firstly, I'm in Australia. This, on a good day, means ~200ms RTT from me to the Lusternia server. At home at the moment, its more like 350ms (ADSL stuff is being routed from West to East Australia, back, THEN out to the US. Crack.), which means I really AM lagged.

The first reason: Tinyfugue does individual blocking send()s every time it writes to the network. This has the unfortunate side-effect of encapsulating one line in a TCP packet. Even with Nagle. So, my attack alias (stand/swing/swing) looks like:

me -> Lusternia: STAND
lusternia -> me: ACK, You stand up
me -> lusternia: ACK, SWING
lusternia -> me: ACK, You swing
me -> lusternia -> ACK: SWING
lusternia -> me: ACK, You swing

each of those takes ~100ms. This is awesomely horrible.

So I hacked write buffering into Tinyfugue. Now it'll buffer writes until the triggers have all run and then do a single send(). Its better: the three commands are sent, BUT I get one reply from Lusternia (STAND), then I send an ACK, then it sends the responses for the other two.

http://www.cacheboy.net/strange-packet.txt - thats a TCPDUMP of the relevant bits.

Now, does that look all fine? Does it look like a server thing (ie rapture is parsing and handling my first line, then doing something else, then parsing/handling the next two), or is there something hidden in the TCP which is limiting how the data is handled?

This stuff has been bugging me for nearly three years, ever since i started fighting in Achaea. I'd love to resolve it somehow - without moving to the US. smile.gif
Simimi2006-03-15 22:49:43
Try Mmucl!!! TRY IT!
love-mimi
Morik2006-03-15 23:52:38
Its too fruity under MacOS/X. The GUI stuff isn't entirely stable.
Xavius2006-03-16 02:42:24
Wow, you are laggy.

I think that's an oddity of how Rapture handles multiple command stacks in conjunction with MUD Compression Protocol. I get similar things when using zMUD, but they all go away (and my commands stack much, much faster) when I use ALC. Everything looks normal.
Morik2006-03-16 06:28:38
QUOTE(Xavius @ Mar 16 2006, 10:42 AM) 270172

Wow, you are laggy.

I think that's an oddity of how Rapture handles multiple command stacks in conjunction with MUD Compression Protocol. I get similar things when using zMUD, but they all go away (and my commands stack much, much faster) when I use ALC. Everything looks normal.


Aha, MCCP. Let me check.

/set mccp=off

I have turned it off. Hm!

Do you use alclient under linux or windows?
ferlas2006-03-16 09:24:01
Err just thinking, arn't they changing the raptor code like now? Would it be a good idea to wait until their changes are put into place to see what they actually do to the game before you do doing something to complicated, it may like completly fix your problem or as close as you can fix it.
Morik2006-03-16 11:32:23
QUOTE(ferlas @ Mar 16 2006, 05:24 PM) 270234

Err just thinking, arn't they changing the raptor code like now? Would it be a good idea to wait until their changes are put into place to see what they actually do to the game before you do doing something to complicated, it may like completly fix your problem or as close as you can fix it.


Heh. Whats wrong with trying to figure out whats wrong with it now? Sure, Rapture might change the way they handle network IO but I like solving problems, and this is a big problem for me. Yay for random interests. smile.gif
ferlas2006-03-16 15:12:27
err k as long as your having fun playing with code biggrin.gif
Laysus2006-03-16 23:58:16
QUOTE(morik @ Mar 16 2006, 06:28 AM) 270208

Aha, MCCP. Let me check.

/set mccp=off

I have turned it off. Hm!

Do you use alclient under linux or windows?



Just let me say, AL Client is only any use under windows for basic coding >.<

Trust me, for 2 years or so I used it :S

Had some points that were better than Zmud, but the rest... Fear.
Xavius2006-03-17 03:15:51
Like the friggin' insane speed? spoton.gif
Laysus2006-03-17 08:27:48
Not with the hoops I put it through. My Zmud system's probably faster unsure.gif
Unknown2006-03-21 13:44:59
Is this the sole dump you took, or are there several showing exactly the same thing i.e. ack,response,ack,response,response?

EDIT: Woo funky kind of double post.