SRCDS Steam group


Optimising srcds usage
#1
Hi guys,

taken a quick look through the search function but haven't found anything as of yet so I'll make a quick post while I carry on looking.

Basically, my community have got ourselves a fairly decent dedicated server (Q6600, 4GB RAM) and we're planning to run 3-4 popular public servers on it. Now, I would have thought this would be no problem, but we started up our first public and populated it (24 slot GunGame 5.1 running at the default 66tick) and we're seeing issues with CPU usage. When 18+ players get on the server, it starts running at around 80%+ of a CPU core and when 24 get on it will sit at 95% and hover between 80 and 100. Now this causes a bit of choppy game play with the unstable tickrate and I was wondering if there was any way we could optimise the server / setup to make sure it's always running smoothly. I'm planning on dropping the slot count to 18 until we find a solution, if not it will have to go down to 18 permanently (no biggy I guess!).

We're running Debian 5 and everything is up to date. The actual srcds server itself is a Counter Strike: Source server running GunGame 5.1 with turbo mode, deathmatch and noblock installed. We're also running gameME stats on the server as well as Mani Admin to keep players in shape. I'm going to be placing a TF2 server on the same box tonight so would like to make sure we can optimise everything before we start loading it up!

Many thanks,
Bret
Reply
#2
What FPS are you trying to run the server at? There was a thread recently on here that suggests lowering HZ to 100 to smooth out CPU usage on large slot count servers.
http://leaf.dragonflybsd.org/~gary

“The two most common elements in the universe are hydrogen and stupidity.”








Reply
#3
It's just running at default (both the kernel and fps_max settings). I think the server runs around 250fps. I actually hadn't thought about that, I'll drop it down to 100 and see what happens. Thanks!
Reply
#4
I am not sure it will help, never tested it. Certain drivers use functions that call HZ, so reducing HZ to 100 may increase throughput on network drivers etc.
http://leaf.dragonflybsd.org/~gary

“The two most common elements in the universe are hydrogen and stupidity.”








Reply
#5
Where exactly do I check the current value / change the value of the HZ setting?
Reply
#6
Another couple of points if you guys don't mind helping out!

1) On the server we're running minigames maps on, certain parts on certain maps are going much faster than normal (mg_do_a_barrel_roll_remix.bsp for example, as well as mg_hellz_multigame) and a couple of other maps we've tried have felt like the physics were a bit screwy. Are there any specific commands we need to make sure all of the physics are running properly? I've already checked and sv_turbophysics is already at "0" so I'm a bit confused as to why that's happening!

2) To stop the servers affecting each other drastically, we wanted to run the servers on their own cores. Now I've read various methods of doing this, but what would be the best / most efficient?

Many thanks,
Reply
#7
(08-06-2010, 10:42 AM)BretW Wrote:  Another couple of points if you guys don't mind helping out!

1) On the server we're running minigames maps on, certain parts on certain maps are going much faster than normal (mg_do_a_barrel_roll_remix.bsp for example, as well as mg_hellz_multigame) and a couple of other maps we've tried have felt like the physics were a bit screwy. Are there any specific commands we need to make sure all of the physics are running properly? I've already checked and sv_turbophysics is already at "0" so I'm a bit confused as to why that's happening!

2) To stop the servers affecting each other drastically, we wanted to run the servers on their own cores. Now I've read various methods of doing this, but what would be the best / most efficient?

Many thanks,

You can set CPU affinity by using the linux command taskset. Taskset is zero based, meaning the first CPU is CPU0. The code below will run a server on CPU0:

Code:
taskset -c 0 ./srcds_run [args here]

I would strongly suggest compiling a custom kernel for your box. There are plenty of examples if you search google. I would also strongly suggest looking into kernel patches (i.e. ck patchset).

Good luck,
DiSTANT
[Image: banner.php?t=2&bg=002244&amp...p;id=82023]

[Image: banner.php?t=2&bg=002244&amp...p;id=82024]
Reply
#8
I have precompiled Debian kernel on my page. Just try out witch Hz and Patchset does best for you. If you know that compile your own. My kernels contain many drivers you probably do not need. It is because i want them tu run on as many systems as possible.

Besides the CPU usgage is always pretty incorrect. "stats" usage ist complete useless. Top and htop can only estimate. Try using load as an indicator if the server is ok.
Interactive web based config creator for CS, CSS, TF2 and DODS
Creates server and client configs in an explained dialog.

You`ll also find precompiled debian gameserver kernels for download
Reply
#9
or better: try looking at the fps if they are stable. that is the only indicator that matters. look into my howto (see the signature) for some other ideas that could help. I would recommend using a kernel with HZ=100, dynamic ticks and a *low* preemption level (other than my howto says), as you seem have problems with the cpu load. this will make the fps a little more unstable but reduce the cpu usage in general.

also: a Q6600 is no longer a pretty decent CPU. it was first built 3 and a half years ago, and intel has introduced (depending on how you count) like 3 new generations since then. so it could actually be the case that running 24 slots is difficult on that cpu. but I think it is not impossible, if you use the proper otimizations.
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#10
Well, what I meant by a "half decent" server was that it was an "ok" Quad Core system. I know that now, it's by far not the best CPU Smile The server load when it gets full is around 1.3, but you know that it's using a lot of the CPU because the tickrate is dropping to 30~ish and spiking around. I'm not an fps whore so I don't really care whether it's running at silly numbers etc. In regards to making the FPS a little more unstable, I'm sure that won't matter, I can just offload the war server that's running on the same box and use the extra CPU / RAM for the other publics. Players on our fun servers won't really care about the FPS since I don't think it effects jumping / shooting a whole lot (especially on full 24 slot gungame servers Big Grin)
Reply
#11
If you are not that into highest and most stable fps set the kernel to largest throughput 100Hz, and so on. If you want to test such a configuration without compiling look at my page.
Interactive web based config creator for CS, CSS, TF2 and DODS
Creates server and client configs in an explained dialog.

You`ll also find precompiled debian gameserver kernels for download
Reply
#12
well, the fps (besides the internet connection of course - which is more important but in a data center easily good enough) determine alone the quality of a game server. if the fps drop especially below 66 (the tick rate) players will notice it as a lag. but also if it doesn't keep some minimum of a couple of houndret one will notice that the hitboxes don't match the models (and thus hits might not be recognized while misses might be recognized as hits). so I don't know what you want to optimize your srcds for, but in fact fps are the only thing to look for. the cpu usage is really just some number that does not matter at all...

remember that srcds cannot use more than one core, so unless you run more than 4 servers at your box you will not gain from moving a server somewhere else. that is also the reason why that box is nowerdays (unfortunately) more like the lower end of what can run srcds servers. the requirements have increased graduately over the past years....
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#13
I do have a question. Where do you get that 'FPS determines quality of a gameserver' ? I would like you to post some code, or some technical documentation that shows that FPS variations influence performance. I would also like to know your basis for performance, where did you come up with the conclusion that FPS is a performance factor, and what does FPS have to do with performance. You graphs do not count, I would like a technical reason. I do not want to hear things like 'because each frame is x/ms of latency and it does this and this' .

Even alfred from valve told me privately that fps>tickrate is useless.

From: Alfred Reynolds <Alfred@valvesoftware.com>
To: 'Gary Stanley' <gary@dragonflybsd.org>
Date: Mon, 31 Aug 2009 17:11:52 -0700
Subject: RE: usleep returning early adding to FPS
Thread-Topic: usleep returning early adding to FPS
Thread-Index: AcoqmLq+lnTdGwtsS0e0lM8ItM0AAQAAASrQ
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
X-Mlf-Version: 7.1.1.1997
X-Mlf-UniqueId: o200909010012410059554
X-Spam-Status: No, score=-6.0
X-Spam-Score: -59
X-Spam-Bar: ------
X-Spam-Flag: NO


Nope, especially if the tick rate is below the FPS.

> -----Original Message-----
> From: Gary Stanley [mailto:gary@dragonflybsd.org]
> Sent: Monday, August 31, 2009 5:12 PM
> To: Alfred Reynolds
> Subject: RE: usleep returning early adding to FPS
>
> Is there any benefit at all to running higher server FPS anyways on the
> source engine?
>
> At 07:48 PM 8/31/2009, Alfred Reynolds wrote:
> >The server FPS is simply cycles / time, where time is from
> >gettimeofday(), with some bounds on the minimum usleep so making the
> >usleep actually less will crank up the server FPS (but not the
> >simulation HZ, so the game isn't actually faster, for Source engine
> games).
http://leaf.dragonflybsd.org/~gary

“The two most common elements in the universe are hydrogen and stupidity.”








Reply
#14
monk, stfu. simply try it out. I also explained the effect a number of times. I do not intend to repeat myself.

ps: which part of the engine did reynolds develop (if any at all)?
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#15
I am just asking a question, then you flame me, per usual. It's OK to admit you don't know, as the engine is closed source; I asked because you are a 'self-expert' on VALVe games.

I suppose the only way to know what Alfred worked on is to email him, but he will probably say 'everything except for the windows GUI code', as I've only ever seen him comment on linux based code and not windows.
http://leaf.dragonflybsd.org/~gary

“The two most common elements in the universe are hydrogen and stupidity.”








Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)