[ut2004] Tweaking Linux for playing games

Rick B zajelo3 at cfl.rr.com
Sat Aug 7 01:00:56 EDT 2004


Gian Paolo Mureddu wrote:

> Rick B wrote:
>
>> Gian Paolo Mureddu wrote:
>>
>>> Rick B wrote:
>>>
>>>> Hi all,
>>>>    I was wondering if anyone had any ideas for the optimal settings 
>>>> for Linux and gaming? Shortly I will be doing a reinstall and that 
>>>> would be a ideal time to start from scratch with building a highly 
>>>> optimized Linux gaming machine. I am not talking about tweaking 
>>>> UT2004, I am talking about the OS. Things that I have in mind are, 
>>>> switching the partition I keep my games on from Reiserfs to XFS as 
>>>> XFS is supposed to read larger files faster, since UT2004 seems to 
>>>> have large files. I have learned to tweak bdflush to write to disk 
>>>> more often in smaller chunks of data rather than to store data in 
>>>> memory and write large chunks at once thus causing the scheduler to 
>>>> not be able to supply the video card with the information it needs 
>>>> to keep your framerate stable. These are just two examples of 
>>>> things that can help make Linux a great gaming OS, surely there are 
>>>> many more tweaks out there that I dont know about. Links are 
>>>> welcome too.
>>>>
>>>>                Rick B
>>>>
>>>>
>>> I'd also mention some of the tweaks you may do to your kernel. For 
>>> starters the use of -mm or -ck patches will definitely help here, 
>>> and since the integration to the kernel (as of 2.6.8) of the new 
>>> Staircase Scheduler, that will mean even better system 
>>> responsiveness. Just out of curiosity, which distro will you be 
>>> installing, you may want to go Gentoo or LFS due to the degree of 
>>> optimization those let you achieve. If you have an Audigy or SB-Live 
>>> class card, you can use the Accelerated OpenAL from this page 
>>> http://www.lost.org.uk/openal.html, I've seen an acutal increase on 
>>> FPS with UT2004 and my ATi card when I used this instead of the 
>>> default openal from UT2004, I still have to do some tests (like 
>>> VoIP), but I can tell you the difference is worth having it.
>>>
>>    I use CCRMA's version of FC1 that is optimized for low-latency 
>> audio work. They still are using the 2.4.26 kernel because tests on 
>> the 2.6 kernel have revealed that the low-latency charactaristics are 
>> not yet as good as the 2.4 kernel, but I don't know if this is the 
>> best kernel (2.4) for gameplay. That is, I don't know if just because 
>> it is good for low-latency audio work means that it is good for 
>> gaming. It seems to perform very well though and I know that it does 
>> include some of the -ck patches. I *was* going to wait for CCRMA to 
>> come out with their version of FC2 and the 2.6 kernel, but I'm kind 
>> of undecided. I have looked at Gentoo and I do have enough disk space 
>> for installing two different distros. I have heard about Accelerated 
>> OpenAL but I use ALSA with the onboard Nforce2 Soundstorm sound on my 
>> mobo.
>>
>>                Rick B
>>
>>
>    I don't know if there will be an Accelertaed OpenAL for nVidia 
> audio, according to the guy who made the one for emu10k1 chips, he 
> only could because Creative has an OpenSource version of the emu10k1 
> driver (which was used to build both ALSA and OSS drivers). I'm 
> currently running FC2 with a custom 2.6.7-ck6 kernel, I applied the 
> -ck patch and I could tell the difference from the stock FC2 kernel. 
> Although Con Kolivas recommends to disable PREEMPT when using this 
> patch (if you have the Hz set to 500+), I've found that the kernel 
> behaves quite well. Another thing that must be said about tweaking 
> your distro for Gaming, is about your DE and window manger. 
> Big-fat-bloated DEs (KDE and GNOME) may induce additional overhead to 
> the machine, so using a light weight WM/DE is recommendable for 
> gaming. I've been looking around for one that both, satisfies my taste 
> in the desktop and is reasonably light weighted. There are many WMs 
> and DEs you can try (Flux, Balck, OpenBox, TWM, VWM, XFCE, etc). Of 
> the ones I've tried, I can safely say that the best *for me* is XFCE4. 
> It is both ligh weighted and VERY functional. Some people call it the 
> light weight GNOME or GNOME's little brother, since it's based on 
> GTK+. It has all the goodies from GNOME when it comes to 
> confiugrability and customizability and also is blazing fast!, the 
> downside is that if you are used to an Explorer-like file manager 
> (Konqueror, Nautilus), the XFFM is a little sour.
>
    On the Nforce2 mobos that have Soundstorm there is a seperate APU 
(audio processing unit) that I believe the latest Nvidia Linux drivers 
now support. I know that before none of the Linux drivers from Nvidia 
supported using the APU and that was always a big deal to me, because in 
my never ending quest for more FPS, I realized that if the drivers did 
use the APU that's less work for the CPU. I don't have the Nvidia 
drivers installed but I think I will use them on this next virgin 
install. What I do know is that when gaming I get more FPS when using 
Alsa than with OSS. Of course I have to tell OpenAL to use Alsa via the 
.openalrc file.
     As far as "mandatory preemption", most everybody I hear talking 
about it says that it's not a good thing. I've been reading on the 
kernel developers list that now they have "voluntary preemption" and 
that it is much better than mandatory preemption. I need to read up on 
this "staircase scheduler" I've been hearing so much about.
    From what I have read most of this talk about "low-latency" and 
"kernel preemption" came about from the professional Linux audio users 
needing Linux to be a "soft realtime" OS. That is, they needed their 
Linux box to prioritize the sound processes at the expense of other 
system processes, so that when a sound process says "I need the 
attention of the CPU and I need it RIGHT NOW! or else my buffer is going 
to run dry, and cause a sound dropout in your recording" the sound 
process gets the CPUs attention so everything comes out alright.
    The professional Linux audio users needs are not that different from 
the Linux gamers needs, except we as gamers want the video card to be 
prioritized, so that when the video card needs processor time it will 
get it or else we will get choppy video play back. However there are 
other areas of concern for the Linux gamer. Like what about when were 
playing online, is the video card hogging all the processor time so the 
ethernet card has to wait to tell the game server that you just pressed 
the fire button?
    So that brings me back to my original question "Are there 
optimizations one can make to Linux to get it to meet a gamers needs 
better?" As I troubleshoot Windows based digital audio workstations for 
a living (Windows isn't my choice, it's my boss') I can tell you that 
gaming is much more resource intensive than *most* recording sessions. 
Although, I wouldn't be near as pissed if my video got a little choppy 
as an audio engineer would be at having a dropout in the middle of a 
recording session.
     Anyway I guess I'm going to start reading up on Gentoo or switch to 
FC2 and the 2.6 kernel. Oh, and by the way,when I game I log out of 
Gnome and into a failsafe terminal to play. It seems to work pretty good.

                Rick B




More information about the ut2004 mailing list