Skip to content

Instantly share code, notes, and snippets.

@veteran29
Last active April 2, 2025 09:04
Show Gist options
  • 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 KiB
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 (250 KiB)
// 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 4096 (32 KiB)
// MinBandwidth = 16384; // 128 KiB, even people in the middle of nowhere should get this these days
// Maximal negotiated client connection speed in bytes, default 250000 (2 MiB)
// MaxBandwidth = 6250000; // 50 MiB
};
// 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: 8000000 (8 Mbps)
MinBandwidth = 8000000; // 8 Mbps
// Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.
// Default: none
// MaxBandwidth = 50000000; // 50 Mbps
// 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

@severgun
Copy link

severgun commented Apr 2, 2025

// 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

@dedmen in discord said that engine default is 32KBytes/s(256kbit/s) and for years this config have values lower than default.
Very low minBandwidth in sockets can cause messages backlog to grow faster than sending pending messages out.

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