Basic Server Config File – Arma 3
m (fix word) |
Lou Montana (talk | contribs) m (Text replacement - "{{Table/A3ServerSetup}}" to "{{Navbox/A3ServerSetup}}") |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | {{TOC|side}} | ||
{{ | {{Navbox/A3ServerSetup}} | ||
This article deals with the '''basic.cfg''', the name means nothing, and can be called anything. The real name is determined by the [[Arma 3: Startup Parameters|-cfg]] command line option when launching the dedicated server or the game executable - in other words '''it also works for clients'''. When you do not provide a name, the default | |||
{{Feature|arma2oa|This page is about '''{{arma3}}''' basic server configuration. For previous titles, see [[Arma 2: Basic Server Config File]].}} | |||
This article deals with the '''basic.cfg''', the name means nothing, and can be called anything. The real name is determined by the [[Arma 3: Startup Parameters|-cfg]] command line option when launching the dedicated server or the game executable - in other words '''it also works for clients'''. When you do not provide a name, the default {{hl|Arma3.cfg}} file is loaded located in the user profile folder. | |||
In this configuration file you should configure your server's connectivity, mainly for performance tuning. | In this configuration file you should configure your server's connectivity, mainly for performance tuning. | ||
= Performance Tuning Options = | |||
== Performance Tuning Options == | |||
There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file) | There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file) | ||
Line 14: | Line 19: | ||
! Parameter !! Default !! Description | ! Parameter !! Default !! Description | ||
|- | |- | ||
| | | {{hl|c= MaxMsgSend = 128}} || {{hl|128}} || Maximum number of packets (aggregate messages) that can be sent in one simulation cycle ("frame"). Increasing this value can decrease lag on high upload bandwidth servers. | ||
|- | |- | ||
| | | {{hl|c= MaxSizeGuaranteed = 512}} || {{hl|512}} || Maximum size (payload) of guaranteed packet in bytes (without headers). Small messages are packed to larger packets (aggregate messages). Guaranteed packets (aggregate messages) are used for non-repetitive events like shooting. | ||
|- | |- | ||
| | | {{hl|c= MaxSizeNonguaranteed = 256}} || {{hl|256}} || Maximum size (payload) of non-guaranteed packet in bytes (without headers). Small messages are packed to larger packets (aggregate messages). Non-guaranteed packets (aggregate messages) are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. | ||
|- | |- | ||
| | | {{hl|c= MinBandwidth = 131072}} || {{hl|131072}} || 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. | ||
|- | |- | ||
| | | {{hl|c= MaxBandwidth = 200000}} || {{hl|UNKNOWN}} || Bandwidth the server is guaranteed to never have (in bps). This value helps the server to estimate bandwidth available. | ||
|- | |- | ||
| | | {{hl|c= MinErrorToSend = 0.001}} || {{hl|0.001}} || Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother at the trade off of increased network traffic. | ||
* Example: A unit 1km (distance d = 1km) from the player with MinErrorToSend = 0.001 (METS = 0.001) would send an update when that unit moves 50m (error value E = 50). | * Example: A unit 1km (distance d = 1km) from the player with MinErrorToSend = 0.001 (METS = 0.001) would send an update when that unit moves 50m (error value E = 50). | ||
* Formula: d = sqrt[(20E)/METS] ; 1000 = sqrt[(20E)/0.001] -> E = 50 | * Formula: d = sqrt[(20E)/METS] ; 1000 = sqrt[(20E)/0.001] -> E = 50 | ||
Line 30: | Line 35: | ||
* When the error value (E) between the master copy of an object (whoever "owns" the object) and a client's perceived/simulated copy of the same object >= MinErrorToSend (METS), a network update message will be sent for it. | * When the error value (E) between the master copy of an object (whoever "owns" the object) and a client's perceived/simulated copy of the same object >= MinErrorToSend (METS), a network update message will be sent for it. | ||
|- | |- | ||
| | | {{hl|c= MinErrorToSendNear = 0.01}} || {{hl|0.01}} || Minimal error to send updates across network for near units. Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well. | ||
* When using MinErrorToSend alone, for small values of distance (d) the frequency of high errors (E) would cause excessive network messages that are not necessary but could negatively impact FPS. | * When using MinErrorToSend alone, for small values of distance (d) the frequency of high errors (E) would cause excessive network messages that are not necessary but could negatively impact FPS. | ||
* Too large of a value for METSN can prevent timely desirable network update messages which can result in units appearing to "warp" | * Too large of a value for METSN can prevent timely desirable network update messages which can result in units appearing to "warp" | ||
{{Link|link= http://forums.bistudio.com/showthread.php?125396-Arma-2-OA-beta-build-84984&p=2103305&highlight=minerrortosend#post2103305|text= Detailed explanation of METS and METSN by Suma}} | |||
|- | |- | ||
! colspan="3" | Networking Tuning Options | ! colspan="3" | Networking Tuning Options | ||
|- | |- | ||
| | | <syntaxhighlight lang="cpp"> | ||
class sockets | |||
{ | |||
maxPacketSize = 1400; | |||
}; | |||
</syntaxhighlight> | |||
| Maximal size of packet sent over network. This '''can be set for both''' client-to-server and server-to-client(s) independently | | {{hl|1400}} | ||
| Maximal size of packet sent over network. This '''can be set for both''' client-to-server and server-to-client(s) independently! {{Feature|important|Only use in the case your router or ISP enforces lower packet size and you have connectivity issues with the game.}} Desync might happen if used '''MaxSizeGuaranteed/MaxSizeNonguaranteed values over the maxPacketSize'''. | |||
|- | |- | ||
| | | {{hl|c= MaxCustomFileSize = 1024}} || {{hl|UNKNOWN}} || Users with custom face or custom sound larger than this size are kicked when trying to connect. | ||
|} | |} | ||
< | == Example Configuration File == | ||
<syntaxhighlight lang="cpp"> | |||
MinBandwidth = 131072; // 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 | MinBandwidth = 131072; // 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 | ||
MaxBandwidth = 10000000000; // Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available. | MaxBandwidth = 10000000000; // Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available. | ||
MaxMsgSend = 128; | MaxMsgSend = 128; // 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 | ||
MaxSizeGuaranteed = 512; // Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512 | MaxSizeGuaranteed = 512; // Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512 | ||
MaxSizeNonguaranteed = 256; // Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256 | MaxSizeNonguaranteed = 256; // Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256 | ||
Line 62: | Line 69: | ||
MaxCustomFileSize = 0; // (bytes) Users with custom face or custom sound larger than this size are kicked when trying to connect. | MaxCustomFileSize = 0; // (bytes) Users with custom face or custom sound larger than this size are kicked when trying to connect. | ||
</ | </syntaxhighlight> | ||
== Notes and Comments == | |||
The greatest level of optimization can be achieved by setting the MaxMsgSend and MinBandwidth parameters. For a server with 1024 kbps we recommend the following values: | The greatest level of optimization can be achieved by setting the MaxMsgSend and MinBandwidth parameters. For a server with 1024 kbps we recommend the following values: | ||
MaxMsgSend = 256; | |||
MinBandwidth = 768000; | |||
While connected to the dedicated server, you can use the [[Multiplayer Server Commands|admin command]] {{ | While connected to the dedicated server, you can use the [[Multiplayer Server Commands|admin command]] {{hl|#monitor}} to monitor server resource usage. (You have to be logged in as or voted as game admin to do this.) The server never runs at more than 50 fps. When running slower, it always uses all available CPU processing power to maintain the smoothest possible gameplay. When running at less than 20 fps, you can consider the server overloaded – the mission currently played is probably too complex for given server. If you see the server is not using bandwidth that it could use, you can try increasing values ''MaxMsgSend'' and ''MinBandwidth''. | ||
---- | ---- | ||
Line 84: | Line 93: | ||
send network updates about what has changed to the server (if on client) or to other clients (if on server)|BI Forums|http://forums.bistudio.com/showthread.php?p{{=}}1363400}} | send network updates about what has changed to the server (if on client) or to other clients (if on server)|BI Forums|http://forums.bistudio.com/showthread.php?p{{=}}1363400}} | ||
=== Related comments by Suma === | |||
In extreme case (provided you have enough bandwidth available) it might mean | ; Does a 10× times lower MinErrorToSend mean also 10× times the traffic from the server? | ||
: In extreme case (provided you have enough bandwidth available) it might mean 10× more traffic. I think it should be easy to measure the effect, using #monitor command or external tools. | |||
; Do lower MinErrorToSend take more CPU processing on the server? | |||
: Yes, some more processing, as there are more messages to handle, but I do not expect anything major. | |||
Yes, | ; Do basic.cfg settings on clients also have an effect? Like for the player entity itself or the AI under his command (AI local to the player)? | ||
: Yes, it affects what client sends to a server as well, but in a different way (the error computation is different, it is not considering any camera position). | |||
; Is that correct that every message contains motion update (or other update) ONLY FOR ONE object? So when we have 1000 AIs near player, and we wish to have update 50× per second for all AIs, we must set MaxMsgSend to higher than 1000? | |||
: The aggregate message contains multiple logical messages, which are related to multiple objects. | |||
The aggregate message contains multiple logical messages, which are related to multiple objects. | |||
'''Related comment by Suma''' | '''Related comment by Suma''' | ||
MinErrorToSendNear is used differently from MinErrorToSend. | * MinErrorToSendNear is used differently from MinErrorToSend. | ||
* When computing the error for MinErrorToSend, the error is divided by (distance_in_m/20m)^2. | |||
When computing the error for MinErrorToSend, the error is divided by (distance_in_m/20m)^2. | |||
Because of this, when MinErrorToSend is small enough so that distant units move smooth,the near units move "supersmooth" (the updates are sent even when the movement is so smooth, it makes no gameplay difference). | Because of this, when MinErrorToSend is small enough so that distant units move smooth,the near units move "supersmooth" (the updates are sent even when the movement is so smooth, it makes no gameplay difference). | ||
* MinErrorToSendNear gives a way to give another absolute (not distance dependent) limit ("never send update smaller than 1 cm, even if MinErrorToSend would allow it to be sent"). | |||
{{GameCategory|arma3|Multiplayer}} | {{GameCategory|arma3|Multiplayer}} |
Latest revision as of 23:24, 4 May 2024
Arma 3 Server Configuration Overview | ||||
---|---|---|---|---|
Setup | Arma 3: Dedicated Server | |||
Files | Arma 3: Server Config File ● Arma 3: Basic Server Config File ● Arma 3: Server Profile | |||
Other | Multiplayer Server Commands ● Arma 3: Mission voting ● Arma 3: Headless Client ● BattlEye |
This article deals with the basic.cfg, the name means nothing, and can be called anything. The real name is determined by the -cfg command line option when launching the dedicated server or the game executable - in other words it also works for clients. When you do not provide a name, the default Arma3.cfg file is loaded located in the user profile folder.
In this configuration file you should configure your server's connectivity, mainly for performance tuning.
Performance Tuning Options
There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file)
Parameter | Default | Description |
---|---|---|
MaxMsgSend = 128 | 128 | Maximum number of packets (aggregate messages) that can be sent in one simulation cycle ("frame"). Increasing this value can decrease lag on high upload bandwidth servers. |
MaxSizeGuaranteed = 512 | 512 | Maximum size (payload) of guaranteed packet in bytes (without headers). Small messages are packed to larger packets (aggregate messages). Guaranteed packets (aggregate messages) are used for non-repetitive events like shooting. |
MaxSizeNonguaranteed = 256 | 256 | Maximum size (payload) of non-guaranteed packet in bytes (without headers). Small messages are packed to larger packets (aggregate messages). Non-guaranteed packets (aggregate messages) are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. |
MinBandwidth = 131072 | 131072 | 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. |
MaxBandwidth = 200000 | UNKNOWN | Bandwidth the server is guaranteed to never have (in bps). This value helps the server to estimate bandwidth available. |
MinErrorToSend = 0.001 | 0.001 | Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother at the trade off of increased network traffic.
|
MinErrorToSendNear = 0.01 | 0.01 | Minimal error to send updates across network for near units. Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well.
|
Networking Tuning Options | ||
class sockets
{
maxPacketSize = 1400;
};
|
1400 | Maximal size of packet sent over network. This can be set for both client-to-server and server-to-client(s) independently! | Desync might happen if used MaxSizeGuaranteed/MaxSizeNonguaranteed values over the maxPacketSize.
MaxCustomFileSize = 1024 | UNKNOWN | Users with custom face or custom sound larger than this size are kicked when trying to connect. |
Example Configuration File
MinBandwidth = 131072; // 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
MaxBandwidth = 10000000000; // Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.
MaxMsgSend = 128; // 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
MaxSizeGuaranteed = 512; // Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512
MaxSizeNonguaranteed = 256; // Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256
MinErrorToSend = 0.001; // Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother. Default: 0.001
MinErrorToSendNear = 0.01; // Minimal error to send updates across network for near units. Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well. Default: 0.01
MaxCustomFileSize = 0; // (bytes) Users with custom face or custom sound larger than this size are kicked when trying to connect.
Notes and Comments
The greatest level of optimization can be achieved by setting the MaxMsgSend and MinBandwidth parameters. For a server with 1024 kbps we recommend the following values:
MaxMsgSend = 256; MinBandwidth = 768000;
While connected to the dedicated server, you can use the admin command #monitor to monitor server resource usage. (You have to be logged in as or voted as game admin to do this.) The server never runs at more than 50 fps. When running slower, it always uses all available CPU processing power to maintain the smoothest possible gameplay. When running at less than 20 fps, you can consider the server overloaded – the mission currently played is probably too complex for given server. If you see the server is not using bandwidth that it could use, you can try increasing values MaxMsgSend and MinBandwidth.
Official Response to the meaning of a Simulation Cycle
Related comments by Suma
- Does a 10× times lower MinErrorToSend mean also 10× times the traffic from the server?
- In extreme case (provided you have enough bandwidth available) it might mean 10× more traffic. I think it should be easy to measure the effect, using #monitor command or external tools.
- Do lower MinErrorToSend take more CPU processing on the server?
- Yes, some more processing, as there are more messages to handle, but I do not expect anything major.
- Do basic.cfg settings on clients also have an effect? Like for the player entity itself or the AI under his command (AI local to the player)?
- Yes, it affects what client sends to a server as well, but in a different way (the error computation is different, it is not considering any camera position).
- Is that correct that every message contains motion update (or other update) ONLY FOR ONE object? So when we have 1000 AIs near player, and we wish to have update 50× per second for all AIs, we must set MaxMsgSend to higher than 1000?
- The aggregate message contains multiple logical messages, which are related to multiple objects.
Related comment by Suma
- MinErrorToSendNear is used differently from MinErrorToSend.
- When computing the error for MinErrorToSend, the error is divided by (distance_in_m/20m)^2.
Because of this, when MinErrorToSend is small enough so that distant units move smooth,the near units move "supersmooth" (the updates are sent even when the movement is so smooth, it makes no gameplay difference).
- MinErrorToSendNear gives a way to give another absolute (not distance dependent) limit ("never send update smaller than 1 cm, even if MinErrorToSend would allow it to be sent").