Skip to content

Instantly share code, notes, and snippets.

@veteran29
Last active October 29, 2022 18:43
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save veteran29/ef08068262df808780fbcd4aeda0c03a to your computer and use it in GitHub Desktop.
Save veteran29/ef08068262df808780fbcd4aeda0c03a to your computer and use it in GitHub Desktop.
Arma 3 Basic.cfg experiments
// This config intends to be a baseline for further adjustments.
// The default values for most of the settings seem to be more fit for good ol OFP days.
// Per socket (client) bandwidth settings
// These values are in BYTES
// value * 8 / 1000 to get kbits
class sockets {
// Packet MTU, keep lower than 1500 to not risk packet fragmentation, default 1400
// 1444 used on official BI servers
maxPacketSize = 1430;
// Initial negotiated client connection speed in bytes, default 32000 (256 kbit)
// It seems that if too set high then clients with slow connection might have issues with joining.
initBandwidth = 1250000; // 10 mbit
// Minimal negotiated client connection speed in bytes, default 8000 (64 kbit)
MinBandwidth = 16000; // 128 kbit, even people in the middle of nowhere should get this these days
// Maximal negotiated client connection speed in bytes, default 2000000 (16 Mbit)
// MaxBandwidth = 6250000; // 50 mbit
};
// These values are in BITS
// Bandwidth the server is guaranteed to have (in bps). This value helps server to estimate bandwidth available. Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded.
// Default: 131072 (128 kbit)
MinBandwidth = 768000; // 750 kbit
// Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.
// Default: none
MaxBandwidth = 52428800; // 50 mbit
// Maximum number of messages that can be sent in one simulation cycle. Increasing this value can decrease lag on high upload bandwidth servers.
// Default: 128
MaxMsgSend = 640; // 640 like official BI servers
@dedmen
Copy link

dedmen commented Apr 14, 2020

maxPacketSize of 1430 is needed to get rid of

NetServer: trying to send a too large non-guaranteed message (len=1348/1372) to

MaxBandwidth will obv cap initBandwidth, so init > max will clamp to init=max. Same for min the other way.

Min bandwidth should be lower than the slowest client that might ever connect to your server. Otherwise packet drop, lag, desync or worse might happen.

@Drift91
Copy link

Drift91 commented May 17, 2021

Min bandwidth should be lower than the slowest client that might ever connect to your server. Otherwise packet drop, lag, desync or worse might happen.

@dedmen Are you referring to line 15, within the class sockets {}; class or the one on line 23? I'm currently trying to figure out why my server lags for players on a symmetrical 1Gbps fiberoptic connection with zero packet loss and over 40 tps.

@dedmen
Copy link

dedmen commented May 18, 2021

yes socket one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment