You are not logged in.

#1 2010-12-30 22:52:17

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,000
Website

[OpenGL] Stutter every 15 seconds on ARCH kernel with nvidia

I recently discovered this problem and thought it was only Wine related, but further research led me to conclusion this has to do something with kernel scheduler and nvidia drivers on all OpenGL applications, so I'll open a new thread with my findings in hope that issue will be resolved.

First, can anyone using nvidia proprietary drivers confirm this? Run extremetuxracer (etracer) choose track "who says penguins can't fly" and watch FPS closely in left bottom corner of your screen (enable FPS option first). Every 15 seconds or there should be a drop from cca 120 FPS (depends on your hardware) to 50-60. Can you see it?

Second, -ck kernel patchset makes any OpenGL game UNPLAYABLE - can anyone using ck and nvidia confirm this (etracer)? And now the REALLY weird thing: setting nice level to 19 (LEAST favorable scheduling) makes the game run better - instead of stuttering every 2 seconds the game is now playable and stutters each 15-20 seconds like on ARCH kernel. Weird!

Third, this problem was already discussed in this thread, but it was focused on World of Warcraft game in Wine. The solution for an old kernel was:

1) Recompile the kernel with CONFIG_SCHED_DEBUG option - this option is already enabled in mainstream ARCH kernel.
2) Add this to /etc/sysctl.conf:

kernel.sched_features=21
kernel.sched_batch_wakeup_granularity_ns=25000000
kernel.sched_min_granularity_ns=4000000

The thing is, in /proc/sys/kernel/sched_*, sched_features doesn't exist anymore in newest kernels. sched_batch_wakeup_granularity_ns is now called sched_wakeup_granularity_ns. sched_min_granularity_ns is called the same as before. I tried setting the latter two to suggested values, but it had no effect.

Here's another thread with the same problem in WoW - the last poster noticed, as I did, that setting niceness to least favorable value reduces the stutter. However, in certain games this stutter every X seconds causes very annoying lag spikes, which renders multiplayer games that require quick response annoying and unplayable.

I'm emphasize that this is problem in ALL OpenGL games, which has nothing to do with Wine, but with kernel and/or nvidia drivers.

How would we apply the settings above to current ARCH or -ck kernel, since sched_* variables were changed and/or deleted? Also, -ck patchset uses entirely different scheduler, so I guess those options would have no point. I also wonder, if this turns out to be a real bug, how come didn't anyone notice more than poor OpenGL performance with -ck patchset?

Thanks,

karabaja4

P.S. I compiled 2.6.37-rc8 in hope of a fix, but no success, it behaves the same as 2.6.36.

Last edited by karabaja4 (2010-12-30 23:51:51)

Offline

Board footer

Powered by FluxBB