d3nn16 3 Posted July 17, 2011 Hi Some months ago I was looking for a best practise guide on how to configure a dedicated arma server for best performance. I found out about the basic configuration file (specified using the -cfg parameter in the shortcut) that looks like this : language="German"; adapter=-1; 3D_Performance=-4194304; Resolution_Bpp=32; Resolution_W=0; Resolution_H=0; 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 // 256 KB x 64 = 16384000 // 512 KB x 64 = 32768000 // 1024 KB x 64 = 65536000 MinBandwidth=16384000; // 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=32768000; // Bandwidth the server is guaranteed to never have. This value helps the server // to estimate bandwidth available. MinErrorToSend=0.008; // 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.01 MaxCustomFileSize=50000; //Users with custom face or custom sound larger than this size are kicked when trying to connect. I could find many threads about this configuration file but none having a clear explanation on how the parameters were linked between them : http://forums.bistudio.com/showthread.php?t=193&highlight=maxmsgsend http://forums.bistudio.com/showthread.php?t=5502&highlight=maxmsgsend&page=2 http://forums.bistudio.com/showthread.php?t=9111&highlight=maxmsgsend http://forums.bistudio.com/showthread.php?t=9507&highlight=maxmsgsend http://forums.bistudio.com/showthread.php?t=288&highlight=maxmsgsend http://forums.bistudio.com/showthread.php?t=7863&highlight=maxmsgsend&page=4 http://www.flashpoint1985.com/cgi-bin/ikonboard301/ikonboard.cgi?act=ST;f=2;t=167;hl=suma http://forums.bistudio.com/showthread.php?t=12944&highlight=maxmsgsend http://www.flashpoint1985.com/cgi-bin/ikonboard301/ikonboard.cgi?act=ST;f=2;t=8959;st=20 http://forums.bistudio.com/showthread.php?t=18695&highlight=maxmsgsend&page=2 http://forums.bistudio.com/showthread.php?t=25698&highlight=maxmsgsend http://forums.bistudio.com/showthread.php?t=88809&highlight=maxmsgsend http://www.kellys-heroes.eu/files/tutorials/dedicated/ A partial explanation can be found in the Wiki but nothing clear enough to allow me to know exactly what values to use for the various parameters. So I tried to come up with a formula : We start with the bandwidth parameters. Lets say I have 20Mbps for the MinBandwidth parameter (I suppose this bandwidth will be used for "guaranteed messages"). And 40Mbps for the MaxBandwidth parameter (I suppose (MaxBandwidth - MinBandwidth) bandwidth will be used for "non guaranteed messages"). Now we can compute the number of messages we can send for both types (guaranteed and not): * number of guaranteed messages that can be sent when MaxSizeGuaranteed = 512 Bytes, MinBandwidth = 20 000 000 bps (IP packet header is 20 Bytes) 20 000 000 / ((512 + 20) * 8) = 4 699 messages * number of non-guaranteed messages that can be sent when MaxSizeNonguaranteed = 256 Bytes, MinBandwidth = 20 000 000 bps, MaxBandwidth = 40 000 000 bps, (IP packet header is 20 Bytes) (40 000 000 - 20 000 000) / ((256 + 20) * 8) = 9 057 messages * so there can be 4 699 + 9 057 = 13756 messages sent each second * maximum simulation cycles per second are 50 (from 50 fps, the arma server maximum fps), so number of messages per simulation cycle is MaxMsgSend MaxMsgSend = 13756 / 50 = 275 I have no idea if this formula is correct but at least it shows what I am looking for. (I tested this on a dedicated server but there was still some lag, someone told me because I also used the cpuCount and exThreads parameters). The other part on performance configuration is about shortcut parameters like -cpuCount, -exThreads and -maxmem. Apparently -cpuCount, -exThreads are useless http://forums.bistudio.com/showthread.php?t=120446&highlight=cores. Is it still true in the latest beta-patch ? What is the current maximum ram that arma can use now ? wiki says 2047 for ArmA 1.01 and in ftp://downloads.bistudio.com/arma2.com/update/beta/ARMA2_OA_Build_82604.log I see this: [71721] Game is now Large Address Aware, should improve stability and allow using more RAM with 64b OS. Thanks Share this post Link to post Share on other sites
gossamersolid 155 Posted July 18, 2011 Apparently -cpuCount, -exThreads are useless http://forums.bistudio.com/showthread.php?t=120446&highlight=cores. Is it still true in the latest beta-patch ? I don't know how you figure that from the thread you linked us... the thread was talking about something completely different. I'm pretty sure -cpuCount and -exThreads just override the auto-detected settings, so if you know you have 6 cores, you can go -cpuCount=6. I'm not sure what settings are valid for exThreads on dedis or even which one is the best as it's never really documented properly by any of the devs. Share this post Link to post Share on other sites
visceralsyn 10 Posted July 18, 2011 (edited) The servers' basic CFG file, while being 100% contextually-vague, is understandable. MaxMsgSend=<limit>; 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 If you know your bandwidth, configurable packets allow you to scale to your bandwidth. Download speeds are not related to serving, its all about upload speed. MaxSizeGuaranteed=<limit>; 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=<limit>; 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 Do note, that while packetsizes for guaranteed and non-guaranteed are configurable. It blatantly states small messages will be packed into larger frames, and that means a frame will not be larger than your MTU. Typically on ethernet MTU is 1500, over the internet you will find MTU's in the range of 1400 to 1472. MinBandwidth=<bottom_limit>; 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=<top_limit>; Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available. These two are the bell-ringers. You surmising one being for guaranteed and non-guaranteed, would be incorrect. The guide blatantly states, MinBandwidth setting is for how much bandwidth the server can use. And MaxBandwidth, what the mysterious maximum, it will never reach is. Some other sites, not mentioning no names, use strange numbers for these two settings. But should you opt to test, you should get best performance using your actual maximum upload speed for MinBandwidth, and a reasonable MaxBandwidth setting. I have found this site invaluable, for getting MaxMsgSend, MaxSizeGuaranteed, and MaxSizeNonguarateed to optimal settings. In LAN, and or on my piddly 2.2Mbps upload speed. ...Syn... Edited July 18, 2011 by VisceralSyn typos and other grammatical errors, as usual... Share this post Link to post Share on other sites
LondonLad 13 Posted July 18, 2011 This site is also helpful to convert 'bps' into other conversions http://home1.gte.net/res0psau/bandwidth-unit-converter.html An example for me is that I have a dedicated 1-to-1 100MB (upload/download), non-contended (not shared with other customers). Therefore my 'bps' that I could use for my 'MaxBandwidth' could be a value of '800000000' bps, as that equates to 100MB Share this post Link to post Share on other sites
d3nn16 3 Posted July 20, 2011 I don't know how you figure that from the thread you linked us... the thread was talking about something completely different. I supposed it from this statement : As far as I've read Hyper Threading isn't supported and will only slow down Arma.. Just wanted to have your opinion on that statement. I'm not sure what settings are valid for exThreads on dedis or even which one is the best as it's never really documented properly by any of the devs. I found valid values for exThreads by looking into the beta-patch log here : ftp://downloads.bistudio.com/arma2.com/update/beta/ARMA2_OA_Build_82604.log If you search for all exThreads keywords you can find : [70192] New: Parameter exThreads=N to control extra threading. Following values of N are currently supported: 0 = no extra threads, 1 = file operations, 3 = texture loading [71117] Optimized: Geometry loading in now optimized for multiple cores. Extra threading now enabled by default on computers with more that 2 CPUs. New possible -exThreads values: 5 (thread geometry loading only) and 7 (thread all) The servers' basic CFG file, while being 100% contextually-vague, is understandable. For me those descriptions are enough if you want to find the optimal values only by experimentation : - Increasing this value can decrease lag on high upload bandwidth servers. - Increasing this value may improve bandwidth requirement, but it may increase lag. Don't you agree that knowing the relationships between MaxMsgSend, MaxSizeGuaranteed, MaxSizeNonguaranteed, MinBandwidth, MaxBandwidth, MinErrorToSend and the mechanics behind each one of them will shorten the time it takes to get to the optimal configuration. Or does BIS intentionally avoid giving details because of the possible criticism it would get back (maybe because the arma server doesn't really perform correctly : what arma server admin can tell you he has the optimal configuration and doesn't encounter lag every day ?). I would appreciate if someone from BIS clarified the matter for all of us. The idea is to know exactly what values to use starting from variables known to the server admin. For example, I know I have X Mbps upload bandwidth -> how many players can I accept on my server depending on mission type played (lots of server and player AIs or only player AIs or no AIs at all, large areas or close quarters, etc) -> what values I need to use for network parameters ? That was only about setting arma network parameters. And once the limits for the number of players and game types are defined depending on network configuration then further tuning can be done depending on server's CPU speed, number of cores/threads and I/O performance (for X server AIs you need Y threads and W CPU frequency, etc). -------- Why are there 2 parameters for bandwidth ? I can understand MinBandwidth but MaxBandwidth ? Why isn't MinBandwidth enough since I know this is a guaranteed value. This is where knowing the mechanics behind MaxBandwidth would help: what does the server do with the bandwidth between MinBandwidth and MaxBandwidth ? is it for "non guaranteed packets" ? What happens if I set both MinBandwidth and MaxBandwidth with the same value ? Is there any official answer on this or anyone has been thoroughly experimenting with this ? Also what type of bandwidth do we need to put here ? Does it include UDP datagram header (8 bytes) ? Does it include IP packet header (20 bytes) ? or is it just data throughput without any headers ? I just found a tool on Google that could help calculate only data bandwidth (http://tptest.sourceforge.net/servers.php). Do you know of any other tools to test data bandwidth ? Other question: if I only set values for MinBandwidth and MaxBandwidth would the latest arma server automatically compute the other parameters from these 2 and not use default values ? --------- About MinErrorToSend. What error is this parameter about, is it network packet/datagram error or is it arma forced position/azimut error for distant units ? I guess it is about the "non guaranteed packets" that are used for position/azimut. I suppose the more a unit is far from your player and controlled AI units the less updates server will send to you about this unit. So what impact has the value of this parameter on performance ? If I use a smaller value does it send more "non guaranteed" packets ? Do I need to set a higher MaxMsgSend value or a higher value for MaxSizeNonguaranteed or both ? --------- "High values for MaxMsgSend can reduce lag" so how do I know the highest value I can use for this ? is it limited by MinBandwidth / MaxBandwidth ? What do they call a simulation cycle ? Is it a frame (like in 50 frames per second, the arma server max fps) ? --------- MaxSizeNonguaranteed: "Increasing this value may improve bandwidth requirement, but it may increase lag". Then is this true: "a smaller value reduces lag" ? --------- MaxSizeGuaranteed: any idea about the effects of increasing / decreasing the value of this parameter ? --------- What are the "packets" whose sizes are set with MaxSizeNonguaranteed and MaxSizeGuaranteed ? Are these sizes referring to the UDP datagram payload (excluding the 8 bytes UDP header)? --------- How can the mpStatistics.log/net.log files help adjusting arma network parameters ? Did BIS provide any description for these files' formats ? mpStatistics.log: AddInitAndRemoveOverridden statistics ... total messages = 66 4 ... Type_10 1 ... Type_40 1 ... Type_41 12 ... Type_42 12 ... Type_45 8 ... Type_46 28 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 191 25 ... Type_10 46 ... Type_46 20 ... Type_213 40 ... Type_214 60 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 205 27 ... Type_10 1 ... Type_40 1 ... Type_41 6 ... Type_42 6 ... Type_45 46 ... Type_46 16 ... Type_213 32 ... Type_214 70 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 63 4 ... Type_10 1 ... Type_40 7 ... Type_42 51 ... Type_46 AddInitAndRemoveOverridden statistics ... total messages = 60 11 ... Type_10 7 ... Type_46 42 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 1 1 ... Type_10 AddInitAndRemoveOverridden statistics ... total messages = 352 26 ... Type_10 28 ... Type_46 26 ... Type_213 52 ... Type_214 220 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 55 26 ... Type_10 5 ... Type_46 24 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 104 4 ... Type_10 6 ... Type_40 43 ... Type_42 51 ... Type_46 AddInitAndRemoveOverridden statistics ... total messages = 115 4 ... Type_10 5 ... Type_40 39 ... Type_42 51 ... Type_46 2 ... Type_142 14 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 26 4 ... Type_10 8 ... Type_46 14 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 15 4 ... Type_10 11 ... Type_46 AddInitAndRemoveOverridden statistics ... total messages = 113 25 ... Type_10 88 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 1769 29 ... Type_10 124 ... Type_46 58 ... Type_213 116 ... Type_214 1442 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 1662 27 ... Type_10 3 ... Type_42 9 ... Type_46 58 ... Type_213 116 ... Type_214 1449 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 442 11 ... Type_10 305 ... Type_46 126 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 1294 7 ... Type_10 69 ... Type_40 74 ... Type_41 452 ... Type_42 561 ... Type_45 20 ... Type_46 6 ... Type_142 105 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 21 6 ... Type_10 2 ... Type_46 13 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 337 5 ... Type_10 328 ... Type_46 4 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 54 3 ... Type_10 51 ... Type_46 AddInitAndRemoveOverridden statistics ... total messages = 104 20 ... Type_10 46 ... Type_46 10 ... Type_213 20 ... Type_214 8 ... Type_231 AddInitAndRemoveOverridden statistics ... total messages = 125 25 ... Type_10 46 ... Type_46 14 ... Type_213 28 ... Type_214 12 ... Type_231 net.log: 40.127: Ch(1):close 40.127: Ch(1):~(0,0,0,0,0) 40.130: Pe(1):stopl(2302) 40.130: Pe(1):~(0,0,ffffffff,2302,0) 40.924: NetLogger: stop - Sun Oct 03 20:07:25 2010 0.000: NetLogger: start - Sun Jul 17 00:22:01 2011 0.000: Clk(2610693) 14.098: ArmA2OA version: 1.59 14.119: 0:22:15 Dedicated host created. 14.272: Fac:start(1.1,2.2,'WinSock 2.0','Running',32767,65467) 15.267: Par: 1.1,65535,1490,90,3,400000,2,32000,8000,2000000,400,0,6000000,1.040,1000.0,0.980,3000000,3000000,65536 15.267: Par: 2.50,150000.0,400,15,0.1500,0.1000,0.0500,0.0200,2.20,30000.0,1.80,20000.0,1.40,10000.0,1.10,3000.0,1.40,1.20 15.267: Par: [0.900,20.0] [0.980,10.0] [1.000,0.0] [1.020,20.0] [1.100,40.0] [1.300,50.0] 15.268: Fac:cp(2304,65507,65535,8192) 15.269: Fac:cp(1,2,65527,'MSAFD Tcpip [uDP/IP]') 15.274: Ch(0):open(XXX.XXX.XXX.XXX:2304 <-> 255.255.255.255:0) 15.275: Pe(0):succ(XXX.XXX.XXX.XXX:2304) 15.275: Pe(0):list(2304) 15.296: Fac:cp(2302,65507,65535,8192) 15.296: Fac:cp(1,2,65527,'MSAFD Tcpip [uDP/IP]') 15.297: Ch(1):open(XXX.XXX.XXX.XXX:2302 <-> 255.255.255.255:0) 15.297: Pe(1):succ(XXX.XXX.XXX.XXX:2302) 15.297: Pe(1):srv 15.297: Pe(1):list(2302) 15.300: Pe(1):srv(2302,'My CTF Server',623191333) 15.452: Pe(1):err-l(5c8,0,0) 15.455: Pe(1):err-l(5c8,0,0) 15.491: Pe(0):cli 15.503: 0:22:16 BattlEye Server: Initialized (v1.118) 15.621: Pe(1):err-l(5c8,0,0) 15.658: 0:22:16 Host identity created. 15.683: Pe(1):err-l(5c8,0,0) 31.357: Ch(1):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 31.465: Ch(0):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 47.405: Ch(1):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 47.661: Ch(0):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 63.424: Ch(1):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 63.857: Ch(0):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 79.442: Ch(1):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 80.052: Ch(0):st(250,250,0,250,250,0,0,3,0/0,0,-1.00,0/0,0,-1.00,0,0) 90.795: Ch(0):~cli 90.797: Pe(1):err-l(5c8,0,0) 90.895: Pe(1):err-l(5c8,0,0) 91.255: Pe(1):err-l(5c8,0,0) 91.264: Pe(1):err-l(5c8,0,0) 91.295: Pe(1):~srv 91.295: Ch(0):close 91.295: Ch(0):~(0,0,0,0,0) 91.298: Pe(0):stopl(2304) 91.298: Pe(0):~(0,0,ffffffff,2304,0) 91.298: Ch(1):close 91.298: Ch(1):~(0,0,0,0,0) 91.299: Pe(1):stopl(2302) 91.299: Pe(1):~(0,0,ffffffff,2302,0) 92.023: NetLogger: stop - Sun Jul 17 00:23:32 2011 --------- Can a player with bad ping/small bandwidth impact the server's performance ? (I hope and suppose the answer is no) Is the only effect that the other players see him warping around ? Thanks for your attention Share this post Link to post Share on other sites
visceralsyn 10 Posted July 20, 2011 (edited) You have no choice but to find the answers to your questions by experimentation. In the 10 years since the release of Operation Flashpoint: Cold War Crisis, BIS has never clarified anything. Oh yeah, its using UDP ...Syn... Edited July 20, 2011 by VisceralSyn typos and other grammatical errors Share this post Link to post Share on other sites
.kju 3245 Posted July 20, 2011 mpStatistics.log is only useful for BI. It contains network statistics. You can forward it to Dwarden for BI to analyze. Share this post Link to post Share on other sites
LondonLad 13 Posted July 20, 2011 A good set of questions all round d3nn16, and one I'm sure most arma server administrators would sorely welcome :) I do hope that at least some of these can be responded too officially. Share this post Link to post Share on other sites