SRCDS Steam group

Optimize Linux Kernel For Game Hosting?
Good Evening All,
I am looking to optimize centos 5.2 for game hosting and wondered if anyone had some tips for doing so.

I will be optimizing a Xeon Quad Core 2ghz 12mb Cache, 8GB DDR2 800mhz Corsair XMS2, Dual Seagate Baracuda 750gb 32mb cache.

I am not interested in services for doing this work as i wish to learn something in the process. I am confident in customizing and compiling the Linux kernel but would like to know if there is anything inperticular i should focus on?

Kind Regards Greg Langford
Are you trying to achieve 1000 fps or are you just looking for "optimized" kernel?

General guidelines are that you should always recompile new kernel to at least enable CPU specific optimizations. The stock kernels don't have CPU specific optimizations because they are meant to be run on wide variety of processors.

The you should also change "pre-emption" to "low-latency desktop" level.

Then also change the kernel timer to 1000 Hz. People claim that this is needed for 1000 FPS systems, but there's no good explanation really, so just set it to 1000 Hz to fool idiots who think 1000 Hz is the same as 1000 FPS - that also stops them bothering you with stupid questions all the time.

Some people also talk about optimizing (=changing the well chosen defaults) hard drive i/o scheduler, but I don't see that necessary because the server doesn't use hard drive much. It's also possible to change the scheduler on-the-fly, so you can experiment with it if you want.

There are few threads also on this forum how to setup high-performance srcds compatible kernel. The almost best thread is at . Unfortunately ClanWoof said he quit playing and takes a break from the whole scene. Nobody has the config, but it would be good base for everybody. If someone has contact to ClanWoof please ask him to post the .config.
Not looking to get 1000fps im not sure that my eye sight could tell the difference haha.
Just need a kernel that is solid and will run a few instances of srcds just to make sure the clients are happy.

I will take note of the suggestions you have made above as im ordering the hardware tomorrow :o)

If anyone else has any suggestions please let me know.

Thanks so far and in advance Smile
check this out:

at the section for user_hz, instead of doing 1500, do 1000 and dont edit jiffies.h

give that a try
What are these exactly?

#ifdef __KERNEL__
# define HZ             CONFIG_HZ       /* Internal kernel timer frequency */
# define USER_HZ        100             /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ)       /* like times() */

The "HZ" value can be configured directly from the "make menuconfig" kernel configuration menu. The "USER_HZ" and "CLOCKS_PER_SEC" can't be configured from "make menuconfig".

What is difference between HZ and USER_HZ? I've understood that the kernel itself (or more like the process scheduler) gives time for different processes in time intervals of 1/HZ seconds. Even then it's possible that some other process gets to run sooner than in 1/HZ time because of the pre-emptive kernel - maybe? Is this so?

I don't like this kind of dum repeating of the couple year old instructions. It could be valid to modify the USER_HZ, but it could also not be. It could be better to run multi-server environments without this USER_HZ hack. If someone knew what this was, then maybe server admins could do the best choice depending on what they're after. If this USER_HZ hack is some sort of optimal choice, then why isn't it in the default in the kernel already? Explanation, people!
Clanwolf just got what he wanted from these forums and left without giving back to the community. Another greed user. Oh well, who cares Smile Would be nice to get a optimzed kernel tutorial for these servers.
I am no Linux Systems Engineer, but this article might answer your question css:

as for the howto, It works. As jake and myself have said, thats where we started and then made some tweaks of our own. I will soon be adding my tweaks to the thread for more options for you guys to try as well as a third 'flavor' using the real time kernel patch.

I try new compiles a few times a week trying stuff I have stumbled across. You just gotta get in their and try some stuff.
I don't need 1000 FPS server, and given the stuff I run on my dedicated server it'd be overkill and would strain my server, but just in spite of you "la-la-la I've got 1000 FPS kernel, you don't have it la-la-la" guys I could go through the trouble of killing my server for couple days and working out the 1000 FPS .config here.

.config is the answer, tutorial is slap on our face.

PS. Hmm.. maybe I go see how fast I can download with my überleet 1 Gb network connection. Maybe I'll do some TCP window and congestion tweaks in the kernel and then post tutorial here how fast my downloads are... heh, maybe if you also try a little you know how fast downloads I have - not that you couldn't have it if you only tried more... noobs (...hey did I say that aloud?)
wow css. just wow.

Colo asked for a howto, so that he can learn it himself.

Dont hijack the thread.
I don't see the .config here.
Quote:Clanwolf just got what he wanted from these forums and left without giving back to the community. Another greed user. Oh well, who cares Would be nice to get a optimzed kernel tutorial for these servers.

As I said when I first made a post about this, I did not want to post what I did tell I know it's working right. I gave you guys this same link on how to do so and said I would rewrite it once I had the time.
It's not very nice to say someone is just a greed user when you only have 40 or so posts, I have been on this forum for the last few years maybe I don't help as much as some of the other people on here because maybe they know a little more than me? I still try to help out some of the people. Thanks for your post you made Ryan saved me a little time in having to write my own for now.

Forum Jump:

Users browsing this thread: 1 Guest(s)