Page 1 of 1

Optimizing Gentoo for Good FPS w/HLDS

Posted: Mon Jun 05, 2006 9:10 pm
by linuxpyro
I have an HLDS, which I set up based on the how-to on Gentoo Wiki (http://gentoo-wiki.com/HOWTO_Halflife_D ... rStrike%29). I am running this on a 500 Mhz machine with 128 MB of RAM. I am using this server to test, as I plan to build a bigger one soon for more players (>10). Right now I am trying to get the most FPS that I can.

I compiled a kernel with the timer frequency set to 1000 Hz, as well as with the low latency desktop option set. Right now I can get a peak of about 249 FPS. What else can I do to increase this?

Sorry if this has come up before; I searched the forums but did not find any useful threads. Also, I Googled, but had similar luck. Can anyone here who runs an HLDS give some performance tips? Thanks for any insight.

Posted: Tue Jun 06, 2006 4:47 am
by gaminggeek
um I did not think that a dedicated server needed any fps?

Posted: Wed Jun 07, 2006 7:02 am
by ChaosLord40k
Wait, I thought lowering the frequency would help a server. That is if you don't have anything else running except that app.

Posted: Thu Jun 08, 2006 3:48 am
by linuxpyro
Everything I could find by Googling stated that raising the timer frequency was what helped; this seems to have held true for my server as well.

Posted: Sun Jun 11, 2006 3:49 pm
by deadstar
A faster server won't give you faster FPS. FPS is all to do with the client machine (your gaming rig).

If it's PING that you're talking about (responsiveness of the server) then yes you are on the right track, but it won't make a huge difference. Consider taking a look at your network setup instead. I'd recommend upgrading your LAN to gigabit, and get the fastest ADSL connection you can afford (assuming it's external not just LAN gaming) if you want a SERIOUSLY good gaming server setup.

Posted: Sun Jun 11, 2006 6:25 pm
by Krogen
Just to add to what deadstar wrote. I'm pretty sure you can't go above 80 (or is it 70?) FPS online in Steam-based games because of the FPS cap - so you won't go faster then your buddy you're playing with.

Posted: Sun Jun 11, 2006 9:07 pm
by Proctologist
you people above should not post if you don't know anything about Half life servers.

Alright, it's easy to get better fps if you add the following to your startup:

Code: Select all

-pingboost 3 -sys_ticrate 1000
Those should get you FPS between 500 and 1000 (depending on your rig's power).

Now I have a question for you! How did you change the frequency of your kernel timer? I feel like a retard cause I can't find this anywhere.

Posted: Sun Jun 11, 2006 9:20 pm
by Diesel_Fuel
I think the people above have a MUCH better idea of what they are talking about than you do. I understand that the ping can be lowered a bit by messing with frequencies. But the FPS that shows on the server will not reflect the FPS that the clients get. It all depends on the power of each of the clients machines. Like some others stated, who cares about what kind of FPS's the server gets. The sever shouldn't even have a graphical window open! As far as I know a "dedicated" server is one that is run though the command line, there's no window open when the actual server is running. Sorry if I'm wrong, but it makes sense to most of us here.

Posted: Sun Jun 11, 2006 9:30 pm
by deadstar
This should clarify a few things:
12. What does the number and FPS mean on the dedicated server window? This number represents the network frames per second rate of data flow. On the old version of the dedicated server software, we were able to change this number (the Tic). As more players join the server, or the more your server bogs down, the lower this number drops. Once it gets to around 25 FPS or below, it's time to optimize your server for better performance, fewer players, etc.
Just Valve's dumbass way of showing server speed, confusing everyone :D

Posted: Sun Jun 11, 2006 9:33 pm
by Proctologist
deadstar wrote:This should clarify a few things:
12. What does the number and FPS mean on the dedicated server window? This number represents the network frames per second rate of data flow. On the old version of the dedicated server software, we were able to change this number (the Tic). As more players join the server, or the more your server bogs down, the lower this number drops. Once it gets to around 25 FPS or below, it's time to optimize your server for better performance, fewer players, etc.
Just Valve's dumbass way of showing server speed, confusing everyone :D
That's exactly it. Thank you. I wasn't trying to be rude either. If you haven't read up on them and understand what terms they use are as the way they are used, you might not be contributing... Just trying to be honest.


And nevermind, I figured out how to change my kernel timer frequency.

Posted: Tue Jun 13, 2006 8:57 pm
by deadstar
Proctologist wrote:And nevermind, I figured out how to change my kernel timer frequency.
Would you mind sharing? I took a look at it last night and didn't get very far. Granted, it was a coffee-driven attempt at 2am, maybe I'll have better luck with a fresh head :lol:

Posted: Wed Jun 14, 2006 1:01 pm
by PaulBredbury
To change the kernel timer:

Code: Select all

cd /usr/src/linux
make menuconfig
Press the "/" key and type HZ_1000
Go to the location indicated (Processor type and features - Timer frequency)

Posted: Thu Jun 15, 2006 5:29 am
by sofachillax
hi,
i played cs since beta 4 and set up some gentoo based cs servers at a local lan party, so i know a bit about cs servers:

if you want your players to have a good, fluent cs experience. _forget_ 10 slots or even more on a 500 mhz machine with 128 mb ram.

i'd recommend 6 slots for real fluent gameplay and 8 slots maximum if you really need em.

also, run hlds with -pingboost 3

but not with -sys_ticrate 1000. use +sys_ticrate 1000 or put "sys_ticrate 1000" in a config file. sys_ticrate is a console command, not a "real" command line option for the hlds binary and therefore is set with a plus (hlds +consoleCommand -commandLineArg).

you may also disable valve anti cheat to squeeze out some fps. it hasn't been updated since ages and a lot of cheats exist for it anyways.
(add "-insecure" as command line argument)

besides, you shouldn't forget to load up a suitable server config file via +exec bla.cfg at the command line or after your server started via "exec bla.cfg" in the console.

Re: Optimizing Gentoo for Good FPS w/HLDS

Posted: Sun Jun 18, 2006 9:33 am
by Mad Merlin
linuxpyro wrote:... as well as with the low latency desktop option set.
It's not named desktop for nothing. Don't use it for servers, it'll hurt your overall throughput.

Posted: Sun Jun 18, 2006 8:15 pm
by linuxpyro
OK everyone, thanks for your input, and sorry for not getting back to you guys sooner. So, here's where I'm at:

Starting the server for CS 1.6, I can get ~930 fps with this command:

./hlds_run +sys_ticrate 1000 -insecure -pingboost 3 -maxplayers 6 +fpx_max 1000

This is just a test server; there will be no more than 3-4 people on it. I have the timer frequency set on 1000, and changed the preempt option back to server (I tried it both ways, and it had no impact). I really can't think of anything else to try, and this looks good enough. Messing with CS Source, I only seem to be able to get ~480. Not to be picky, but at this point is it just mostly a hardware deal, ie this will improve with better hardware?

Once again, thanks for your input; with luck this thread will help others out as well.

Posted: Mon Jun 19, 2006 2:36 pm
by sofachillax
forget fps_max, it is only used to limit fps on clients.

Posted: Mon Jun 19, 2006 5:16 pm
by bennettp
Just to clear up the confusion about the kernel latency timer:

It really only makes a difference when the system is under heavy load. A higher frequency makes your system seem "smoother" or more responsive; it increases percieved performance, while decreasing actual performance. It does this by switching between processes more often -- if it's set to 1000Hz, then the kernel will switch between processes 1000 times each second. This comes at a cost of extra overhead (it takes time to switch between tasks). On the other hand, a lower frequency makes the system seem less responsive, but the benefit is that you system will have greater throughput; in other words, more work will get done.

On a server, its usually better to use the default frequency (100Hz), since throughput is more important than "smoothness". However, on a desktop, you might prefer to raise it to 250Hz or 1000Hz to make your system feel more responsive.

Posted: Mon Jun 19, 2006 5:37 pm
by linuxpyro
gr3ml1n wrote:forget fps_max, it is only used to limit fps on clients.
I tried the command with and without the fps_max setting, and it did in fact make a difference (my server fps doubled when I set fps_max to 1000).

As for the timer frequency, this machine is a dedicated server for CS, so I am not worried about much in terms of poor performance for other services.