SRCDS Steam group


Kernel how-to
#1
Hi all,

I have written a how-to for optimizing the Linux Kernel for srcds and hlds. You can find it in my new Wiki about the Half-Life 1 and 2 engines I am currently creating. The Wiki structure is not yet complete, so I give you a direct link to the how-to (else you wold not find it ;-)):

http://wiki.fragaholics.de/index.php/EN:Linux_Kernel_Optimization

Questions and comments are always welcome, as some help filling the wiki with information (as soon as the basic structure is complete) ;-)

EDIT: Link updated
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
#2
Wow just in the right time!
I just did a kernel compile and the CPU amount taken by SRCDS remains the same.
I hope to change that with your tutorial Smile
Reply
#3
probably not really. the CPU amount is not the quantity one should optimize the system for, unless you want to run as many game servers as possible on a single machine, regardless of the quality ;-) the only thing that really matters are stable fps.

n.b.: the cpu amount is not really well defined, with respect to srcds/hlds. the server is running at a millisecond scale (1000 fps = 1ms per frame), but the CPU amount is typically averaged over 1-2 seconds. Meaning, you might have 10% cpu load but still frame drops, because the cpu is used exactly in that moment the server should calculate the next frame. that is where my how-to should help ;-)
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
#4
Questions:
What is an RT patch, why should I use one?
Should I use the RT patch and the same Kernel version if theres a new Kernel version (but no patch)?
I mean, the latest available Kernel is 2.6.27.9 but the latest RT patch is 2.6.26.6 .

Edit:
OK, then I'll try this later. Maybe you could help with this one?
http://forums.srcds.com/viewtopic/9112
Reply
#5
RT(RealTime)-patches isnt available to every single version of the main kernels.
It would require too much work.
Latest stable RT-patch is for kernel 2.6.24.7-rt24(10-Dec-2008), but I haven't had any problems with the "unstable" 2.6.26.6-rt11 since it was released 13-Oct-2008. http://www.eu.kernel.org/pub/linux/kernel/projects/rt/
"the box said 'requires windows xp or better'. so i installed linux"
Linux Ubuntu 9.04 Server 2.6.30-vanilla #1 SMP PREEMPT x86_64
Reply
#6
Ah now I understand. Thanks.
Reply
#7
Couple of other things to add/consider.

Select processor type and architecture.
Disable Kprobes
Disable CPU Scaling
Disable SELinux
Disable support for PCI hot-plug.
Disable Bluetooth support.
Disable IrDA support.
Disable Amateur Radio Support
Disable ATM Support
Disable Firewire Support.
Disable fusion MPT device support.
Disable ISDN support.
Go into Network Device Support then disable PCMCIA & ATM network device support. Go back to Device Drivers screen.
Disable MMC/SD card support.
Disable MISC devices
Under input device support disable touchscreens, joysticks and gamepads
Disable all Laptop support

There's a bunch more as well, I'll post again later when I'm at home. Most of this does nothing more than reduce kernel bloat.

Preferably on RHEL/CentOS users should build using, the tut seems debian based. While transferable, ideally on centos/rhel...

make menuconfig
make bzImage
make modules
make modules_install
make install
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#8
vigor Wrote:Disable CPU Scaling
I thought it would be off if PM is disabled... ;-)

Quote:Disable SELinux
that's something you need to decide while installing Linux, I don't think its a good idea to disable this in kernel if your Linux relies on it? And if it is not used it will probably not hurt... But nevertheless I have added a general note not to use SELinux.

Quote:Disable support for PCI hot-plug.
Disable Bluetooth support.
Disable IrDA support.
Disable Amateur Radio Support
Disable ATM Support
Disable Firewire Support.
Disable fusion MPT device support.
Disable ISDN support.
Go into Network Device Support then disable PCMCIA & ATM network device support. Go back to Device Drivers screen.
Disable MMC/SD card support.
Disable MISC devices
Under input device support disable touchscreens, joysticks and gamepads
Disable all Laptop support
I seriously doubt that you will gain anything. If you really want to "optimize" your kernel on that level, you need to disable everything that is not used. That means you need to know exactly which hardware is in your system. I think you will gain less than 1% performance, and describing this will really go beyond the scope of the howto... In particular it has nothing to do with game servers but with general Linux optimization.

Quote:There's a bunch more as well, I'll post again later when I'm at home. Most of this does nothing more than reduce kernel bloat.
same here. it will reduce the build time and number of kernel modules. but as long as the modules are not loaded they are as good as deactivated.

Quote:Preferably on RHEL/CentOS users should build using, the tut seems debian based. While transferable, ideally on centos/rhel...
I only gave some examples based on debian. The other distribution I use is gentoo, but I don't think I need to tell a gentoo user how to compile his kernel ;-) In my opinion, everything depending on the distribution needs to be separated. Maybe you could create an new page in the wiki explaining how to create an initrd for RH-based systems (and link it in the howto)? Seriously, I don't know ;-)

Quote:make menuconfig
make bzImage
make modules
make modules_install
make install
no difference from my commands ("make" w/o arguments will do a make bzImage and a make modules). try it! the kernel sources don't depend on the distribution!

Thanks for the feedback, I already did some changes!
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
#9
BehaartesEtwas Wrote:I only gave some examples based on debian. The other distribution I use is gentoo, but I don't think I need to tell a gentoo user how to compile his kernel ;-) In my opinion, everything depending on the distribution needs to be separated. Maybe you could create an new page in the wiki explaining how to create an initrd for RH-based systems (and link it in the howto)? Seriously, I don't know ;-)

<3 Gentoo... Anyways i'll send you something regarding the initrd for rh systems.

Regarding the bloat, some of the modules are loaded into the kernel by default some are modularized, at the very least removing the non-modular items is a good idea. Not only for kernel space but compilation times as well.

Obviously there's hundreds of items that aren't needed by most systems and some don't have the time or desire to go that deep into it, but I try to Smile
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#10
Vigor, can you help me with a kernel recompile?
Reply
#11
tr0gd0r Wrote:Vigor, can you help me with a kernel recompile?

I can help you... join the #sourcekernel chan
[Image: banner.php?t=2&amp;bg=002244&amp...p;id=82023]

[Image: banner.php?t=2&amp;bg=002244&amp...p;id=82024]
Reply
#12
vigor Wrote:Obviously there's hundreds of items that aren't needed by most systems and some don't have the time or desire to go that deep into it, but I try to Smile

Ok, that would be nice. But I think we should keep this separated (e.g. in a independent how-to in the wiki), else it will be really hard for those who compile their own kernel for the first time ;-)
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
Well, after following the guide and removing as much kernel bloat as possible and doing other system tweaks i get 992fps which leads me to confusion.

I can easily achieve 995fps without these settings/kernel. But when using this it degrades it down to 992.

I have hit the 1000fps mark before and i expected this one to but unfortunately not. Though i cant remember exactly how i did it Sad something to do with the power managment stuff, acpi etc or something.

But this has gained me a generally stable 992 so far Smile
Reply
#14
Just an FYI.

That FPS and to an extent stability can be heavily dependent on north bridge Chipset.

Seaburg chipsets for example will hold FPS constantly with little modification other than simply setting HZ to 1000.
Game Server Administration Services
Linux & Windows performance specialist.
http://www.viGeek.net
Reply
#15
no matter what it seems, i do a new kernel, get 1000 fps, but loading times on the server are increased by a factor of 10.

I duno why I keep bothering. I never see a difference between 300FPS vs 1000. I don't think anyone else really does either. When people know their server is doing 1000 fps, their mind is tricked into thinking it's running better, much like a sugar pill.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)