View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023699 | Return of Reckoning | General | public | 2024-12-04 05:10 | 2024-12-16 12:05 |
Reporter | R1CH | Assigned To | MaxHayman | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | assigned | Resolution | open | ||
Summary | 0023699: Server-side TCP socket does not appear to be configured for TCP_NODELAY | ||||
Description | It looks like the server tick rate is 20 FPS, which should result in game state update packets being sent to clients every 50ms on average. Based on analysis of the ACK timings seen on the game's TCP connection, the server does not send new packets until the previous TCP segment has been ACKed, so users with a ping higher than 50ms will have multiple update packets batched into a single TCP segment, increasing their latency. This strongly suggests that Nagle's Algorithm is active on the server side of the TCP socket, causing game update packets to be buffered at the OS level while there's an outstanding TCP segment. This is made worse as the game client runs with TCP delayed acks enabled per Windows defaults (I'm pretty sure the OS API to control this didn't even exist back then), adding even more latency. A pcap from a US West player showed only 5-7 packets per second were being received. It's possible the client buffers some of the game state to reduce the effects of latency, but there should still be some noticeable impact from this. This can be fixed on the game server by disabling Nagle's Algorithm with the TCP_NODELAY socket option (Socket.NoDelay = true in C#) on client socket connections. Doing so should result in 20 FPS updates to all clients regardless of how high their latency is, improving the responsiveness of the game for players with higher pings. As the server is already buffering updates for the tick rate, I don't believe any other changes would be needed, so this could be a very impactful one-line fix. | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2024-12-04 05:10 | R1CH | New Issue | |
2024-12-10 01:50 | Emissary | Assigned To | => MaxHayman |
2024-12-10 01:50 | Emissary | Status | new => assigned |
2024-12-11 03:36 | Sinisterror | Note Added: 0045726 |