Server Help

General Questions - Server.ini Comms section to remain eternal mystery

qan - Sun Nov 12, 2023 12:36 pm
Post subject: Server.ini Comms section to remain eternal mystery
Hi guys. First legitimate post in this subforum in (-checks watch-) 7ish years, eh? I'll be shocked if I get a response. Pleasantly so, though.

I've been looking for details on some of the mystery server.ini settings in the Comms section, and searches aren't turning up a whole lot. My theory is that some of our network settings can be tuned a bit for modern connections.

Some of these are guessable, but has anyone figured out what they actually do? In TW we use settings that deviate heavily from the defaults and I would like to have a better idea why.

PacketHistoryMax
IncomingBufferSize
OutgoingBufferSize
EncryptMode
UnreliableBufferSize
TransportBufferSize

See: https://wiki.minegoboom.com/index.php/Server.ini



Also wondering if any subgame diehards have tweaked FlushTime and SelectTime. I'm betting in 2023 we can tune these values down a bit. TW currently uses:

FlushTime=20
SelectTime=10

20ms between flushing position packets?! I have no idea why TW has double the default. Will experiment. Wonder how taking it lower than 10 will perform. CPU usage is basically nothing on modern machines.
monkey - Tue Nov 14, 2023 12:49 pm
Post subject:
Here's what I figured out after a very quick look at the disassembly. Some of it might be wrong or incomplete.

PacketHistoryMax:
This sets the size of a packet log in number of packets. The total memory usage will be (PacketHistoryMax * 540).
Didn't look at its use. Possibly used during core dumps of server crashes so you can see if anything fishy was happening to cause the crash.

IncomingBufferSize:
This sets the size of the operating system's internal UDP socket receive buffer.
Setting this higher will help with burst windows of packet receiving so that none of the packets are dropped by the operating system.

This is the actual call being made if you want more information:
setsockopt(socket, SOL_SOCKET, SO_RCVBUF, &IncomingBufferSize, 4);

OutgoingBufferSize:
This sets the size of the operating system's internal UDP socket send buffer.
Setting this higher will help with burst windows of packet sending.
OS Specific: If the internal send buffer is full, either the send call will block or the packet will be dropped immediately.

This is the actual call being made if you want more information:
setsockopt(socket, SOL_SOCKET, SO_SNDBUF, &OutgoingBufferSize, 4);

EncryptMode:
Value 1: Normal Continuum encryption.
Value 2: Not sure what the point of it is, but it seems to prevent clients from sending EncryptionRequest packets with key 0. Might be some security thing or outdated.

UnreliableBufferSize:
Doesn't seem to even be used, unless it's some obfuscated string.

TransportBufferSize:
Does something but too lazy to figure it out. Possibly something with keep alives or sync timing. Maybe the buffer size of pending packet results from those requests.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group