PDA

View Full Version : Original post from the steam forums 1000Fps server configs



siosios
12-08-2008, 06:17 PM
Hi All!

Siosios stumbled upon a set of kernel patches that seem to do the job!
We have tested it on several servers now, and have seen 995 FPS on a linux box, and because we support the community, we both where in the opinion that we need to share this information with everyone!


PLEASE NOTE!!!
I have see problems with base AMD processors with this kernel. ( untested on opterons ) It will run, but server fps is all over the place.. and low. If you run into this, and find a solution, let us know. But all the INTEL based systems ( xeons and core duos ) that we have used worked fine.

This seems to be a 'magic' combination of kernel / kernel bugs / patches, as we have both tested many many many kernels to try to get something working.
The hirez timer patch has been rolled into the newer kernels, and ck has continued to write his patches, but even on the latest 2.6.20 we are not seeing fps rates above 500. ( but it is a nice smooth 500... )

This kernel has been pre-patched, and tar'ed up for you to download and 'make'. Here are the basic steps to get this working on your server.
( Please note, any time you make a new kernel, you should have read up on the steps, and the warnings of how you can completely screw it up... These steps will be based on a fedora distro, and should match many others, but your milage may vary )

You will also have to have your standard set of gcc / make / ncurses / ect.. to compile

( I'll use '->' to represent the console command line prompt )

First, go get the kernel...




-> wget http://www.n00bunlimited.net/files/linux-2.6.17.patched.tar.gz
(it's 229 megs... Please be gentle on my bandwidth)

Ok, now you've got it.. Time to un 'tar' it..




-> tar xfz linux-2.6.17.patched.tar.gz


Now change to the directory...




-> cd linux-2.6.17.patched

Now that your have the kernel, and your sitting in the main directory, you should ( need ) to grab your existing kernels config file, and copy it here.




-> ls -la /boot/config

*You should see a list of one or more config files for your existing kernels. Copy your current config file into this directory...




-> cp /boot/config-(INSERT YOUR CONFIG NAME HERE) ./.config

Now the hard part.... Configuring the config file to match your system....




-> make menuconfig

This should open up your kernel configuration utility...

Here is a wonderful quote from NitOxYs!
***************************************

Quote:
****WARNING****
Whatever you configure here, is what your kernel will do, so be careful to not take something out you don't know.

Do start the configuration utility,
Do a



make oldconfig or menuconfig

For Menuconfig, a gui comes up, you need ncurses-devel and ncurses installed to do so.
Be aware if it gives you a hard time.

I suggest finding the specific drivers for the motherboard, chipset, video, sound, anything you need to run the server. There is <font>a lot</font> of bloat in there for Wireless cards, extra bs about sound cards, telephony devies, 56k crap.. If you are running 56k on a server just stop reading right now and close up shop.. No I'm just kidding.

When configuring the I/O Schedulers under block options,
Make sure you choose anticipitory, set it as default.

Get rid of the bloat, exit out and save the config file.


You'll need to step through this, and remove anything your absolutly sure you do not need. ( do you really need arcnet? )
Once your sure you haven't removed anything you do need, exit and save the config file.

Now that you have a nice fresh config file, your ready to compile. ( The patches are already added, and the kernel HZ are hard coded for you )

(Note: You will see some 'Warning' messages, it is safe to ignore these )




-> make all

It'll do its thing for a while...




-> make modules

It'll do more...




-> make modules_install

it'll move some stuff around...




-> make install

Now your kernel is all ready to go..
Time to check that your boot loader will load the right kernel for you...
Best thing to do is to set 'grub' to load your kernel only once, on the next boot.
If something is wrong, the next boot will revert back to your current kernel, and you can try again. ( or delete all of this! )




-> grub
savedefault --default=0 --once
quit

Now your can reboot, and hope this works!




-> reboot

Once your system does come back.. See what kernel its running...




-> uname -a

Is it the new one? If so go celebrate! If not... you can try to copy a fresh config file, and this time don't remove anything. If that doesn't work, your probably screwed. sorry. ( well, your never really screwed if you work at it.. go do some reading, and see whats wrong. )

Ok, now that we are running again, we should adjust the srcds command line to allow max frame rate...
Add '+fps_max 0' to your srcds command line, and start it up.
Once the server is up and running, ( and finished loading all your plugins / map / bots ) Type this:




fps_max 1000
stats

Do you see your FPS above 333? ( or 500 )
If so, send beer to siosios and me!

Then go change 'grub' to boot this kernel every time!




->grub
savedefault --default=0
quit

Good luck!
Chumly

original steam post located here --> 1000 fps kernel available here... - Steam Users' Forums (http://forums.steampowered.com/forums/showthread.php?t=537014)

additional files used in testing are located below:

linux-2.6.20.1.tar.gz (http://www.n00bunlimited.net/nu/linux-2.6.20.1.tar.gz)
patches-2.6.20-hrt-dynticks1.tar.bz2 (http://www.n00bunlimited.net/nu/patches-2.6.20-hrt-dynticks1.tar.bz2)