> I feel like such a linux nub... how do you set your clocksource? On any fairly recent 2.6-series kernel you can put this right on the kernel boot commandline:
clocksource=$whatever like clocksource=hpet or clocksource=tsc so that it is set at boot. The echoing of available options into the /sys entry is valid as well, ie: # echo "hpet" > /sys/devices/system/clocksource/clocksource0/current_clocksource but is more of a post-boot type thing. That's not bad, necessarily. You can use it to change the clocksource post-boot. This is useful if you are experimenting with different ones because you can change the clocksource without rebooting. So to get a list of which clocksources your hardware has available: # cat /sys/devices/system/clocksource/clocksource0/current_clocksource you'll get something like this back (but it will vary from system to system): tsc jiffies hpet acpi_pm Someone else asked whether running a 500Hz timer resolution will allow you to get a stable 500 server fps. I'm not going to say it is impossible, but I will say that *I* have yet to find a server machine (server-class hardware) that would let me get 500fps with a 500Hz kernel. I've only ever been able to get 500 server fps with a 1000Hz or tickless kernel, and setting fps_max to 600 or higher. Entirely possible I'm just not doing it right though. But what I do works, so I keep doing it. :) Setting fps_max to 600 usually gets me around 490-496 server fps. CPU utilization for the core a full 30-slot server runs on is usually around 60-65% on a 2.5GHz Harpertown but it does briefly peak higher at times. This is under F10 x86_64 with a stock 2.6.27 kernel (which I'm pretty sure is built dynamic/tickless) and I can get ~1000 server fps out of it for our CS:S games by setting fps_max to 2000. I'm using clocksource=hpet currently, but have considered experimenting with tsc since I've read that there are some recent userspace optimizations in glibc for it on x86_64 which may be of benefit. (And yes, I know you don't need to run 1000 server fps on CS:S to get a good smooth game, or 500 server fps on TF2, but our server has the spare cycles. And let's face it, for server ops this game is ALL about attracting players to your servers and since with GSP advertising etc. many players are convinced they have to be on a 100 tick 1000fps counterstrike server to be on a "good server".. well you get the idea) I also use isolcpus= on the kernel cmdline to set aside processor cores for the high-demand games. The cores our TF2 games run on are the only processes allowed to execute on those cores. All hardware IRQ service is "pinned" to specific other cores by disabling irqbalance and programming the smp_affinity for each valid numeric IRQ. http://kbase.redhat.com/faq/docs/DOC-15596 Cheers > > On Fri, Mar 6, 2009 at 11:56 PM, The Universes > <[email protected]>wrote: > >> Do you think dropping it down to 500HZ is a better choice or do you >> suggest something else? If yes, does 500HZ still maintain 500FPS? >> >> Thanks! >> >> Gary Stanley wrote: >> > At 10:33 PM 3/6/2009, The Universes wrote: >> >> I'm running 4 32 man TF2 servers at 500fps (66 tick) and I'm >> wondering >> >> if having kernel at 1000HZ (not tickless) with PREEMPT is necessary? >> >> Is that putting unnecessary strain on my CPU (Q9300)? >> >> >> >> My second question is if you guys use HPET as your clocksource >> >> $ cat >> /sys/devices/system/clocksource/clocksource0/available_clocksource >> >> tsc hpet acpi_pm jiffies >> >> >> >> $ cat >> /sys/devices/system/clocksource/clocksource0/current_clocksource >> >> tsc >> > >> > >> > 1000hz kernels make nanosleep() expensive to call.. on a core2quad >> > calling usleep (which calls nanosleep) >> > >> > nanosleep: 6157 cycles >> > >> > That's alot of cpu time. Cranking up HZ makes interrupts fire so >> > often, so you get more accurate sleep behavior.. >> > >> > TSC lives on the CPU, so calling it is fairly cheap. HPET lives off >> > somewhere on a bridge, so you need to go out to PCI land to >> > read it. HPET is a decent choice, but overall the fastest one is TSC. >> > >> > >> > >> > >> >> Would you recommend changing that to HPET? >> >> >> >> I'm basically trying to lower CPU usage so it doesnt shoot up to 90% >> >> sometimes. >> >> >> >> Thanks, >> >> Dan >> >> >> >> _______________________________________________ >> >> To unsubscribe, edit your list preferences, or view the list >> >> archives, please visit: >> >> http://list.valvesoftware.com/mailman/listinfo/hlds_linux >> > >> > >> > _______________________________________________ >> > To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> > http://list.valvesoftware.com/mailman/listinfo/hlds_linux >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlds_linux >> > > > > -- > From Ben B. (Goerge) > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > !DSPAM:3,49b22f4024131787113967! > > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux

