Linux kernel and game performance?

Dan Kegel dank at kegel.com
Mon Oct 25 18:26:09 CDT 2010


Hey folks,
I've run into two web sites that claim that the Linux kernel causes performance
problems in particular games (see below).  Anybody know of others?

And has anybody found concrete improvements in performance
of a particular app (other than an audio workstation app) from using
a realtime kernel?

Thanks!
- Dan

First:

http://wiki.archlinux.org/index.php/World_of_Warcraft#Kernel_Timing_Bug
says in a section dated September 2008:
"If you are having problems with choppy video every 15 seconds or so,
it is related to the kernel scheduler...
to fix, add CONFIG_SCHED_DEBUG=y to your kernel config, then set
kernel.sched_features=21
kernel.sched_batch_wakeup_granularity_ns=25000000
kernel.sched_min_granularity_ns=4000000
in /etc/sysctl.cfg."

Yikes.  Any truth to that rumor?

Second:

http://hisouten.koumakan.jp/wiki/Linux_support#Resolved_bugs
says

"The game runs too slowly
Symptoms:
Instead of running at about 60-62fps, like the game is supposed to,
it'll run closer to 53fps. This is not ideal.
The bug:
This is a Linux timing issue. The game runs a secondary timing thread
with THREAD_PRIORITY_TIME_CRITICAL, where it simply sleeps for 16ms
and sends events to the main thread to tell it that a new frame is
needed. On Linux the necessary timing accuracy is not available, so it
wavers between 16ms and 20ms.
The fix:
I hacked around this by setting the timer period to 14ms. This leads
to a steady 62-63fps. Which is close enough for use, really. For a
constant 60fps turn on vsync in your video drivers."



More information about the wine-devel mailing list