Jump to content
Sign in to follow this  
insomnianshadow

Dedicated Server Tipps, Tricks and Tweaks

Recommended Posts

First of all who hell of the moderators here did delete this thread !?!?!?!?!

Seems like this either was a mistake or someone here doesn't want the world to know how to properly setup a dedicated server for ArmA icon_rolleyes.gif ......

Eitherway I expect an explantion about why this thread was deleted.....

Unfortuantely I am unable to restore all the thread posts but I will repost my configs I use running my server since I get regularly mails from people that want to know my server setups....

Hardware:

CPU - Intel Conroe Core 2 Duo 6300 @ 2.8GHz

RAM - 1Gb @ 800Mhz

ISP - QSC 1Mbit\2Mbit Upload Speed  

Software:

OS - Windows XP Pro SP2

GAME - ARMA 1.05

Script - Custom Arma Server Keep Alive script

The custom timed keep alive server script for ArmA for Windows XP Professional:

Quote[/b] ]// keepaliveserver.js

// This script starts the Armed Assault server and checks every minute, whether it is still running or not.

// If the server for some reason is no longer running, the script tries to restart it 3 times in a row,

// then gives it up.

// The script can be terminated with 'Ctrl + C', by closing the script-window or by killing the

// process 'cscript.exe' in the tasklist. The server process has to be terminated seperately.

// If there is a server-uptime set to a value larger than 0, the script will terminate the server

// after that time.

//

// call: cscript keepaliveserver.js

//

// © 2006 Adam Sosnowski, www.nichteva.de

// last changes: 17.09.2006

var server = "arma_server.exe -config=server.cfg -netlog -port=2302";

var sleep_minutes = 1; // time between server-checks

var uptime_minutes = 480; // server-uptime

WScript.Echo(new Date().toLocaleTimeString() + " - *** Welcome to the Armed Assault timed keep alive server script! ***\n"

+ "           © 2006 Adam Sosnowski, www.nichteva.de");

var d = new Date();

var end_time = d.getTime() + uptime_minutes * 60000;

d.setTime(end_time);

if (uptime_minutes > 0)

WScript.Echo("           server uptime is set to " + uptime_minutes + " minutes\n"

+ "           shutdown will be initiated at " + d.toLocaleString() + "h");

var WSHShell = WScript.CreateObject("WScript.Shell");

WSHShell.CurrentDirectory = "..";

KeepAliveServer();

function KeepAliveServer() {

WScript.Echo(new Date().toLocaleTimeString() + " - starting server '" + server + "'...");

var process = WSHShell.Exec(server);

var retries = 0;

var wbemFlagReturnImmediately = 0x10;

var wbemFlagForwardOnly = 0x20; // speed up the query

var objWMIService = GetObject("winmgmts:\\\\.\\root\\CIMV2");

var colItems, enumItems;

while (retries < 4)

{

while (process.Status == 0)

{

if (uptime_minutes > 0 && new Date().getTime() > end_time) {

WScript.Echo(new Date().toLocaleTimeString() + " - server uptime reached, terminating...");

process.Terminate();

WScript.Echo(new Date().toLocaleTimeString() + " - server is down, see you next time!");

WScript.Quit();

}

WScript.Echo(new Date().toLocaleTimeString() + " - OK, server is running");

retries = 0;

WScript.Sleep(sleep_minutes * 60000 - 5000);

// kill dr. watson, who prevents the server from crashing directly

colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'dwwin.exe'", "WQL",

wbemFlagReturnImmediately | wbemFlagForwardOnly);

enumItems = new Enumerator(colItems);

for (; !enumItems.atEnd(); enumItems.moveNext()) {

enumItems.item().Terminate();

}

WScript.Sleep(5000);

}

WScript.Echo(new Date().toLocaleTimeString() + " - server is down! restarting in 3 seconds, " + ++retries + ". try...");

WScript.Sleep(3000);

process = WSHShell.Exec(server);

}

WScript.Echo(new Date().toLocaleTimeString() + " - giving up...");

}

Make sure you save this script quote as a "js" file and place it in a new created folder in the "ArmA" directory.. Also in case you want to run the server daily at a specific time for a certain amount of time use a bat file to run it in a automated way which can be then controlled by the windows xp scheduler...

Bat file to run the script:

Quote[/b] ]@echo off

start cscript keepaliveserver.js

The Configs for 1 Mbit server upload bandwidth:

Arma.cfg

Quote[/b] ]language="English";

adapter=-1;

3D_Performance=7389.000000;

Resolution_W=640;

Resolution_H=480;

Resolution_Bpp=32;

MaxMsgSend = 256;

MinBandwidth = 1024000;

MaxBandwidth = 1280000;

server.cfg

Quote[/b] ]passwordAdmin = "XXXXXXXX"; // password to protect admin access

password = ""; // password required to connect to server

hostname="Conroe 3Ghz 1Mbit 1Gb ArmA 1.05 Server";

motd[]=

{

"Welcome to Oneofthe8devilz's Conroe ArmA 1.05 Server",

"Hosted by Oneofthe8devilz",

"Please be patient and stay connected, It will definitely be worth the wait",

"Connection loading times sometimes may take several minutes",

"We are about to found a new Multi-Gameing-Clan, in case you are interested to join...",

"Contact us at oneofthe8devilz@hotmail.com",

"Once loaded and connected please carefully read the mission notes and instructions !",

"Our TeamSpeak server runs at spyer72.dyndns.org:35000",

"So good hunt soldier and happy fragging wink_o.gif",

}; // Welcome message

motdInterval=10;

voteThreshold=0.33; // when one third agrees, this is enough to confirm a vote

reportingIP=""; // private server - no reporting

persistent=1; //keeps the mission running when no client is connected

//  voteMissionPlayers=3; // start voting when 3 players connect

// checkfiles[]={"HWTL\dta\data3d.pbo","dta\data3d.pbo"}; //list of files to check for identity

kickduplicate=1; // do not allow duplicate id

// equalModRequired=1; // require equal mod

maxPlayers=11;

The Configs for 2 Mbit server upload bandwidth:

Arma.cfg

Quote[/b] ]language="English";

adapter=-1;

3D_Performance=7389.000000;

Resolution_W=640;

Resolution_H=480;

Resolution_Bpp=32;

MaxMsgSend = 256;

MinBandwidth = 1536000;

MaxBandwidth = 2304000;

server.cfg

Quote[/b] ]passwordAdmin = "XXXXXXXX"; // password to protect admin access

password = ""; // password required to connect to server

hostname="Conroe 3Ghz 2Mbit 1Gb ArmA 1.05 Server";

motd[]=

{

"Welcome to Oneofthe8devilz's Conroe ArmA 1.05 Server",

"Hosted by Oneofthe8devilz",

"Please be patient and stay connected, It will definitely be worth the wait",

"Connection loading times sometimes may take several minutes",

"We are about to found a new Multi-Gameing-Clan, in case you are interested to join...",

"Contact us at oneofthe8devilz@hotmail.com",

"Once loaded and connected please carefully read the mission notes and instructions !",

"Our TeamSpeak server runs at spyer72.dyndns.org:35000",

"So good hunt soldier and happy fragging wink_o.gif",

}; // Welcome message

motdInterval=10;

voteThreshold=0.33; // when one third agrees, this is enough to confirm a vote

reportingIP=""; // private server - no reporting

persistent=1; //keeps the mission running when no client is connected

//  voteMissionPlayers=3; // start voting when 3 players connect

// checkfiles[]={"HWTL\dta\data3d.pbo","dta\data3d.pbo"}; //list of files to check for identity

kickduplicate=1; // do not allow duplicate id

// equalModRequired=1; // require equal mod

maxPlayers=13;

Allright current and future ArmA hosters.. all there is to say is happy hosting wink_o.gif

Share this post


Link to post
Share on other sites

Umm,  there is an easier way.  I use the following method in my daily business practices to run and monitor processes running as services.  ( I am the director of IT for a NA corporation, if only they knew I'm using my knowledge to further ArmA around the world......hehe )  nener.gif

Here is the way to run Arma_Server.exe as a windows "service" and therefore be able to start at system boot (if you desire), monitor it, run it with alternate security credentials (ie. local system), and be able to restart it!

Here's how,

1. Go to http://www.codeproject.com/system/xyntservice.asp and download a little app made by Xiangyang Liu called "XYNTServiceProject.zip"

2. Extract XYNTService.exe and XYNTService.ini from the .zip and place in your %systemroot%\gamepath folder. (folder which contains the ArmA_Server.exe file.)

3. I renamed the XYNTService.exe and XYNTService.ini to ArmA_Service.exe and ArmA_Service.ini respectively (I have more than one instance of this service for different apps)

4. Goto Start > Run > and enter "cmd" (without quotes) into the run field, then hit enter.

5. In the command prompt window navigate to your %systemroot%\gamepath folder.

cd\ <--hit ENTER after each command

cd "\program files\ArmA" <--use quotes around the path

dir <--to verify that the service .exe and .ini are there

ArmA_service -i <--this installs the service to your "services" list in administrative tools.

6. Now we need to modify the service .ini file. Open the ArmA_service.ini using notepad. Here is my sample .ini

[settings]

ServiceName=ArmA_Dedicated <--the name under which it will show in the "services" list

CheckProcessSeconds = 120 <--how often to check if service still running

[Process0]

CommandLine = f:\games\ArmA\ArmA_Server.exe -cfg=the_Monk.cfg -netlog <--all on one line

WorkingDir= f:\games\ArmA\ <--path to game folder

PauseStart= <-- not needed

PauseEnd= <-- not needed

UserInterface = Yes <-- wether or not you can see it in taskmanager

Restart = Yes <-- here's the restart command

WARNING!! the "CheckProcessSeconds=" value should NOT be set too low as you may not be able to down your server to make changes. I speak from experience!!! ;0

7. Now navigate to "Administrative Tools" > "Services" (alternatively run "services.msc" from the START > RUN field) and check the properties for the newly installed service "ArmA_Dedicated" (or whatever you called it in the .ini file value "ServiceName=") By default it will be set to start automaticaly. Here you may also change which credentials the service should run under. I've left mine at the default "local system" and the service runs fine. DO NOT change the "restart" settings here in the properties, that is what the .ini is for!

8. As soon as you right-click on the new service name and click "START" the service will start, which will in turn start your server!

I have tested and implemented all of the above on my server (the_Monk's [PROVING GROUNDS]).

To those who are averse to cli's and typing (averse to controlling their own destiny....hehe) a GUI to admin the above service can be found at the same website http://www.codeproject.com/cpp/XYNTServiceWrapper.asp

I have NOT used the GUI so please no questions related to the GUI (I'm sure it's self-explanatory anyway!wink_o.gif

Share this post


Link to post
Share on other sites

Now that's weird .. I am not able to reach that thread .... neither by the search for author option nor by manually browsing the "ArmA- Multiplayer" thread .. how come ?

The only way for me to access the thread is by clicking on your link....  confused_o.gif

***update***

Okay the time search range is set to 1 month by default.... Now that explains alot smile_o.gif

Probably should be changed....

I am obviously too much used to the Doom 3 forum search functions over at doom3world.org.... anyways sorry for the wrong Accusation   thumbs-up.gif

Share this post


Link to post
Share on other sites

some questions how do you bind the arma.exe to cpu1 or cpu2 when doing a dual core yay.gif

Share this post


Link to post
Share on other sites
some questions how do you bind the arma.exe to cpu1 or cpu2 when doing a dual core  yay.gif

By starting the task manager and rightclicking on the arma.exe process and selecting "Set Affinity".... then there you can choose which cores should run the process....

Share this post


Link to post
Share on other sites

BTW,  what I detailed in my above posting works for every single game I've decided to run a dedicated server for.  All you have to do is rename the service.exe and service.ini, change a line or two in the service.ini and you can have a "service" in the services.msc list for each and every dedicated server you run (in fact you could make multiple instances with this as well......I do! smile_o.gif )

"the Wise learn to swim, by watching Fools drown."  --  the Monk

"thank GOD for the multitude of Fools."  -- the Monk

Share this post


Link to post
Share on other sites

Or you can just get microsofts srvany.exe program and make it a service add it to registry correctly, then in your services console go under "recover: and choose when fails restart. (not looking at it at the moment so I am paraphrasing)

Share this post


Link to post
Share on other sites
Quote[/b] ]By starting the task manager and rightclicking on the arma.exe process and selecting "Set Affinity".... then there you can choose which cores should run the process

This way is not recomended as you will need to do this every time you restart the server.exe. A better way is to use a Deamon tool which will let you set the affinety perminently

Share this post


Link to post
Share on other sites
Max @ May 25 2007,02:01)] Or you can just get microsofts srvany.exe program and make it a service add it to registry correctly, then in your services console go under "recover: and choose when fails restart. (not looking at it at the moment so I am paraphrasing)

Except that "srvany.exe" has limitations which the method outlined in my post does not.  I do this stuff for a living, it's my job to know if there was a better way of doing this, and should one pop-up, I will change my servers to use it.   smile_o.gif

btw...my posted method DOES add it to the registry correctly. If you follow my instructions, or alternatively download and use the GUI the newly created/installed service shows up nicely in the "services.msc" list and can be controlled from within. It is however recommended to use the .ini included to set service monitoring and leave the "recovery" options in "services.msc" alone.

"the Wise learn to swim, by watching Fools drown."  -- the Monk

"thank GOD for the multitude of Fools."  -- the Monk

Share this post


Link to post
Share on other sites

Guys, you are totaly forgot about files which located in Doc&Settings\Username\My Documents\Arma

They are affected server settings too.

Share this post


Link to post
Share on other sites
Quote[/b] ]By starting the task manager and rightclicking on the arma.exe process and selecting "Set Affinity".... then there you can choose which cores should run the process

This way is not recomended as you will need to do this every time you restart the server.exe. A better way is to use a Deamon tool which will let you set the affinety perminently

http://www.firedaemon.com/ is a program that will run any .exe as a service and set affinity to CPU

FireDaemon Pro allows you to schedule, configure, install and run your application program executable or script as a Windows Service. FireDaemon Trinity provides all the functionality of Pro but allows you to manage and deploy services across your network.

welcome.gif

Share this post


Link to post
Share on other sites
Guys, you are totaly forgot about files which located in Doc&Settings\Username\My Documents\Arma

They are affected server settings too.

For a dedicated server you only copy your ArmA directory, no ?

I don't think that arma_server.exe use an ArmA profile to launch the server.

Share this post


Link to post
Share on other sites

www.serverdoc.com

Remote server administration tool... Can automaticly restart your server, can be used to stop/start/restart ur server remotely through a webpage (password protected), and so on and so on... Highly usable application for any gaming community, especially with multiple admins for possibility to turn off servers or on when needed etc. We use it aswell for our Test Server so mission testers can start the server and stop it after their done smile_o.gif

Guys, you are totaly forgot about files which located in Doc&Settings\Username\My Documents\Arma

They are affected server settings too.

For a dedicated server you only copy your ArmA directory, no ?

I don't think that arma_server.exe use an ArmA profile to launch the server.

Wrong, ArmA_Server does use ArmA profile.

Share this post


Link to post
Share on other sites
www.serverdoc.com

Remote server administration tool... Can automaticly restart your server, can be used to stop/start/restart ur server remotely through a webpage (password protected), and so on and so on... Highly usable application for any gaming community, especially with multiple admins for possibility to turn off servers or on when needed etc. We use it aswell for our Test Server so mission testers can start the server and stop it after their done smile_o.gif

Guys, you are totaly forgot about files which located in Doc&Settings\Username\My Documents\Arma

They are affected server settings too.

For a dedicated server you only copy your ArmA directory, no ?

I don't think that arma_server.exe use an ArmA profile to launch the server.

Wrong, ArmA_Server does use ArmA profile.

Yeah your right, but the profile doesn't need to be in that directory, no ?

If i remember right what i see this afternoon, we can use -profiles and save a profile somewhere in the arma directory ?

But what information do we have to keep in the profile ? We don't need all information ?

I found nothing on the wiki for that (or maybe bad search ?)

oh and thx for the url, that can be very useful !

Edit : blblbl wow_o.gif it's look like when i tested the -profiles i've missed the games created a profile itself ! Gonna have to take a look at this biggrin_o.gif

Share this post


Link to post
Share on other sites

This might be a simple stupid question but. Is there a comand line for setting the ip of the server. I have a multi-ip server and I wish the server to start on other than the base ip of the server.

TC admin says its changing it but it always report the base ip

Share this post


Link to post
Share on other sites
Quote[/b] ]MaxSizeNonguaranteed=?? (256 default);

This setting is very useful against warp, it is set at 256 default, i've put it to 64 and soldier warp a little bit but nothing really annoying.

I am searching a way to see the real bandwith the server could have.

I've run some upload/download on the net who said 80Mbits down & 20Mbits up .. look very huge.. but well i choose a minbandwidth=15000000; but i am not sure it's the best for performance choice ! ^^'wink_o.gif

Here the server carac :

Intel Core 2 Duo E6300 (1,8Ghz)

1Go RAM DDR667

The 100Mbits bandwidth (divided in 80Mbits dl & 20Mbits ul)

A strange thing i've seen, is a lag to take equipment in ammo crates or dead body when "double clicking", but no lag (or very few) when using the "button" to take or abandon equipment. ArmA related ?

We have played around 20 players on coop missions (some heavy), it looks like the server could handle them (20 to 35 fps). Some really overloaded the CPU with 8 FPS on the monitor, but strangely the game still running cool with no lag/warp !

Edit : Ah yeah i forgot, i really don't know what is "3D_performance" in the arma.cfg ? What it is for ? And how to set it correctly ?

What happens if we set a value too low/too high ? Is there a way to "bench" the server or something like that ??

Here is my arma.cfg

language="English";

adapter=-1;

3D_Performance=7389.000000;

Resolution_W=640;

Resolution_H=480;

Resolution_Bpp=32;

MaxMsgSend = 512;

MaxSizeGuaranteed=512;

MaxSizeNonguaranteed=64;

MinBandwidth = 15000000;

MaxBandwidth = 20000000;

MinErrorToSend=0.001;

but i am thinking about setting maxmsgsend to 2048 and increase the max bandwidth limit to 100mbits

another settings i am not sure to understand is MaxSizeGuaranteed

I read the explanation on the wiki, but i am not sure of what that say. Should we reduce the value for better performance ? Or increase the size of the packet ?

Share this post


Link to post
Share on other sites
Quote[/b] ]MaxSizeNonguaranteed=?? (256 default);

I've run some upload/download on the net who said 80Mbits down & 20Mbits up .. look very huge.. but well i choose a minbandwidth=15000000; but i am not sure it's the best for performance choice !

This is what we had on our 100mBit server Server on RN/Kaos/88th/XR-CTI Game on OFP you may onley get 20mbps Upload becuse the upload test you are doing is max 20mbps smile_o.gif

// Performance Tuning

frameRate=36.00000;

MaxMsgSend=512;

MinErrorToSend=0.01;

MaxSizeGuaranteed=1024;

MaxSizeNonguaranteed=512;

MinBandwidth=14000000;  // 14MBIT min bandwith

MaxBandwidth=34000000;  // 34mbit max bandwith

Also you forgot one very important Parlament in youre config

Maxmem=1024;  // Amount of Ram server got <--very important Line most people forget about or you can add it this way arma.exe' -config=server.cfg -maxmem=1024

Share this post


Link to post
Share on other sites

Well i only know what is write on the Wiki.

Did BIS write a complete documentation about the dedicated server settings ? I don't think so :/

What is the framerate settings for ?

I will try to add the max memory, but i am not sure it's very important for the server.

What about 3D_Performance ? Do you know how to set it well ? I really don't know what it is for too.

Oh yeah, i forgot. What the increase of MaxSizeNonguaranteed gonna do ? (256 -> 512)

Share this post


Link to post
Share on other sites

3dPerformance does not matter that is for youre video card when you play the game

Framerate Command tryes to keep the server at the Desired framerate.

you can check the server load via loging in and doing #monitor 5

Change yourre Config so it looks like this

// Performance Tuning

frameRate=36.00000;

MaxMsgSend=512;

MinErrorToSend=0.01;

MaxSizeGuaranteed=1024;

MaxSizeNonguaranteed=512;

MinBandwidth=14000000;  // 14MBIT min bandwith

MaxBandwidth=34000000;  // 34mbit max bandwith

Maxmem=1024; //sets server memorey

//Cheat Pervention

verifySignatures=1; //Checks Checksum Value//Directory paths

kickduplicate=1; //prevents Team spying and Fade aka server lag

checkfiles[]={"dta\core.pbo","dta\bin.pbo"}; //checks Pbo files Via md5 Chcksum Values comapred to server

// other

disableVoN=1;// Disables Voip in game

pistols.gif

the MaxSizeNonguaranteed is For Packet Size i belive changeing thoes settings Incresses packet size im not sure try my Above Config tell me if it works good for you on youre 100mbit server

Share this post


Link to post
Share on other sites

I can't try it now because some of my clan players are currently on it. But i save them in a file on the server, i will try them later and came back here to say you how it is working smile_o.gif

Thanks ! notworthy.gif

Edit : well i've tried these settings, but looks like the warp returns, so i overwrite to set my old arma.cfg I hope the next dedicated server will have performance improve

Share this post


Link to post
Share on other sites

Refresh the page i edited it alot sorey im tired

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×