Create an account

Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimising computer performance

This is meant as a start of a general guide on improving how Xonotic runs on computers by dealing with system configuration rather than Xonotic configuration. Maybe such a thing can be edited over time and made a sticky? I'll start it off anyway and if no one is interested, so be it. Tongue

This guide starts from the low level and works up!

Get some baseline performance results
Run The Big Benchmark to assess your systems performance in Xonotic and compare it to results of similarly specced hardware:
Take note of the results and also look at things like memory usage reported in your OS. You can track these results with changes that you make to see what improvement you get.

Hardware inventory
Make a note of all hardware that you have, use tools like CPU-Z under Windows and Hardinfo under Linux to identify specifications of CPU, motherboard and RAM that are not normally immediately available

Open up your computer and deal with the lowest levels of configuration: remove any hardware that is not required. An old floppy drive for example will just waste electricity and is another device for the computer to have to work with.

Your motherboard may have jumpers on it. Read the manual and identify what they all do. If you don't need something, disable it! This may also be where to start looking at overclocking/undervolting if you wish to do so.

BIOS and firmware updates
Manufacturers may have released firmware updates. Although unlikely to give performance improvements it can address issues. Look at more than the motherboard BIOS. Graphics cards have BIOSes also which although rarely updated can be modified with tools like NiBiTor and RaBiT to change speeds, voltages, fan speeds, NTSC/PAL output formats etc. This can be worth exploring and I have previously added split frequency and voltage settings for 2D/3D use this way. Hard disks and even optical drives sometimes have new firmware so see if anything is available.

BIOS options
Go into the BIOS and disable everything that you do not need. If you have a separate sound card for example you should disable the onboard sound in the BIOS. This is very different from disabling it in your OS and does much more! Floppy disc controllers, obsolete SCSI or IDE controllers, onboard video, network interfaces, serial ports, parallel ports etc. can all be disabled in the BIOS properly rather than leaving your OS to just mark them as disabled. It may save a tiny bit of memory and CPU for each thing you disable.

BIOS timings, speeds and voltages
Look at CPU, RAM and interface timings, speeds and voltages in the BIOS. This is also where overclocking can happen if you wish too. Motherboards generally use quite conservative timings to provide best stability with a wide number of different components. For example cheap RAM may cause instability on tighter timings. However, you may well have a set of components that will work on tighter settings. Many motherboards even give you preset options for this:
Optimal - conservative defaults
Aggressive - tighter memory timings, this is where you want to start
Expert - all user configurable timings, much experimentation can be done here!

Go through the whole BIOS and look for options like this, typically you'll find it for memory and CPU but also maybe for AGP/PCI-e. If you push something a little too far you may find some instability, how to stress test? The Big Benchmark is your stress test! If something goes wrong, go back into the BIOS and undo it. If something really goes wrong you can always do a BIOS reset by pulling out the battery.

Also if you have dual or triple channel memory your BIOS may not enable it's use by default. Switch it on if it's not on by default and verify that you get something like 'Dual channel enabled' written to the screen on startup. With modern chipsets there is also more than simple multi-channel memory, most offer separate interleaved and asymmetric modes. Interleaved is fastest, then asymmetric, then single channel. If you are confident that your RAM and motherboard support multiple channels but you are still getting single channel mode then check that your RAM is in the correct slots!

Some specific notes:
AGP aperture size:
If you have an AGP graphics card then an amount of system memory can be marked for caching textures which can't fit in your video cards memory. The size is normally able to be set in the BIOS in numbers like 32Mb, 64Mb, 128Mb etc. If you have one of the very rare end of line AGP 1Gb graphics cards you don't need to really bother about this but if you have an older 64Mb or 128Mb card this can make a huge difference to Xonotic performance on higher texture settings. If you make it too big then less memory might be available for Xonotic so it can be a balancing act if system memory is low. The AGP aperture is shared so you only lose the memory size that is actually being used. Try values of 1/4 and 1/2 of your system memory and see what happens.

DDR memory speed:
If you have DDR (not DDR2 or DDR3) then the speed of your memory is probably 266MHz, 333MHz or 400MHz (yeah, I know that's a double pumped speed). Is 400MHz faster than 266MHz? Not always! If your CPU FSB is running at a lower rate then interleaving CPU and memory clocks becomes a problem. Running the CPU and memory clocks at the same speed is almost always fastest. The fact people paid MORE MONEY in 2002-2006 so that they could set their RAM up to perform WORSE is crazy but that's business...

Use the right OS
Now that you have the hardware set up properly, time to look at the OS. First thing is make sure you're running the right OS for your computer. If you have a 64-bit CPU, use a 64-bit OS. If considering Linux do some research into how your hardware may work under Linux.

Get your OS up to date.

Kernel recompile (or not)
If you run Linux then recompiling the kernel is always an option. However, unless something is very wrong in your default kernel you won't notice any real performance increase in Xonotic. Where things do matter is that you can sometimes save ~20Mb of RAM and boot times can be cut as well.

Look at the services/daemons running on your computer and disable everything that is not required. The method for doing this vary on your operating system but the effect is very similar, you reduce memory and CPU overhead and can also improve boot time. It's amazing how many Linux distros put things like LVM on by default even when they are rarely used by most users.

Device drivers
Review the drivers that are installed on your system. Anything not working correctly could result in poor performance or instability. Under Windows there are sometimes problems with left over files and configuration from old drivers. Software like Drivercleaner can help deal with this junk. On Linux lsmod can give you a list of all modules, typically used for drivers. How you change modules from being loaded may vary by your distribution but can save a bit of CPU and memory overhead by removing any that are not needed. MIDI sound anyone?

In general the latest drivers are the fastest but not always the case, particularly if you have older hardware and the manufacturer is more interested in their newer products.

AGP drivers
On systems with AGP graphics cards a driver is required for the AGP slot, otherwise it works at PCI speed. This driver normally will be part of the motherboard chipset driver but not always. Look up the AGP speed supported by the motherboard and graphics card and make sure that the correct speed is in use. The current speed can be found with some drivers in the Xonotic console when it reports GL_RENDERER. Otherwise a tool like GPUID or Rivatuner will report this. AGP8x had 16 times the bandwidth of PCI but don't expect a 16 fold increase in performance. 50% is more likely!

Microsoft supplied video drivers:
When installing Windows, drivers from Microsoft may be set up by default for your graphics card. While there may be no noticeable issues for normal desktop use, these drivers have NO OpenGL support. Everything will run at a very slow software emulated speed probably less than 1 fps. They also don't support S3TC texture compression so you will get this red message in the console:
ERROR: Texture compression is required but not supported.
Always download the best drivers from your graphics card manufacturer - they may even be tagged the same version number but they DO support OpenGL!

Proprietary/open source Linux graphics drivers:
If you have an ATI or NVIDIA graphics card then you have a choice of a closed source driver provided by the manufacturer or an open source driver maintained by a community. Which is supported and performs better may vary on your system, so try the different options and see. Some information on the open source drivers is available here:

There are also many options to experiment with. For example due to software patent issues S3TC (texture compression) is currently disabled by default, you can enable it with:
export force_s3tc_enable=true
This will get rid of the nasty red
ERROR: Texture compression is required but not supported.
messages in the console and might or might not improve performance.

Tray applications
On a fresh restart look at the programs that are running on your computer. Do you need all of them? Some Windows software is especially bad at installing chummy little helper applications that sit in your system tray using 10Mb of RAM and giving a pop-up message every boot to tell you that they are not up to date. Uninstalling them is the best solution, if not then
Start>Run 'msconfig'
and disable everything that you don't need.

Desktop environment
You can set up your desktop environment for better performance too. Do you need semantic search? Do you need sticky keys or audibile notifiers for the blind? Switch them off. If you are running Linux then you always have the option of switching desktop environment. The old stereotypes don't all hold true however, XFCE can be a pretty heavyweight desktop and the KDE 4 series has progressed a long way in performance with recent releases. Gnome 3 is still a pig. A desktop environment change could give a big memory overhead reduction but you need to balance up what works best for your use.

Compositing window effects
This is something that can make a BIG difference to Xonotic framerate:
A compositing window manager renders indirectly allowing fancy 3D hardware accelerated effects when moving and resizing windows. On Windows this has been around since Vista and on Linux it's been around in varying forms since around 2005. Running these effects may look pretty in your desktop but do nothing for games and make them perform worse. A quick test on my system gave around 15% improvement on normal effect level when disabled. It may be possible to temporarily disable effects when launching a game depending upon your environment:

KDE: KWin has been seen to create visual tearing artefacts in game due to differences in vysnc settings. It should be disabled to prevent this. There is an option in the Settings manager to 'Suspend desktop effects for fullscreen windows' but this does not work as expected. Basically you have three ways currently:
1. It can be toggled by pressing Alt+Shift+F12 when starting and ending any game.
2. A KWin rule can be used:
.txt   xonotic.kwinrule.txt (Size: 302 bytes / Downloads: 16)
3. An alternative is to modify the xonotic-linux-sdl or glx script and replace:
exec "$@"
if [[ "$(qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive)" = "true" ]] ; then
qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing

exec "$@" &
wait $!

if [[ "$(qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive)" = "false" ]] ; then
qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing

Compiz: A more general way of working with Compiz is to switch the window manager to something else at the point when the game is run, in this example Metacity. Replace:
exec "$@"
if ps -A | grep compiz > /dev/null ; then
metacity --replace > /dev/null &
exec "$@" &
wait $!
if $COMP ; then
compiz --replace > /dev/null &

This will automatically disable and enable compositing when running Xonotic including on the-big-benchmark. 15% improvement for a few lines of code? Result. A word of warning though: it will only improve FPS dramatically when running at a high FPS already. The per-frame improvement in rendering speed at 5fps won't be very big.

Windows Vista/7 'Aero': Desktop effects can be disabled on a per application basis via the 'Compatibility' tab on a shortcut's properties:
You would have to set up shortcuts to do this and the-big-benchmark would have to be set up separately. It has however been reported that this option is NOT available for 64-bit programs.

So there's a start. I hope it helps someone already. Please add if you wish.
I'm at least a reasonably tolerable person to be around - Narcopic

wow ... thats long ... and .... ... ... wow

very good job ... I like that you mention the kde4 desktop compositing effects and how to turn them off ... It took me a while to figure those out (minecraft will even crash while compositing is on)

Nice edh! Desktop environments indeed eat up huge amounts of ressources. I always felt that especially KDE abuses your system ressources. It's like 40 % of your ressources is busy looking pretty, 30 % is busy with background tasks that I would never need, 30 % is busy digesting software errors and 20 % is busy doing what it's actually supposed to do. Ever since I switched to LXDE I am enjoying that stuff I don't need actually doesn't work because it's not installed. Cool
My Xonstats Profile
Latest track on soundcloud: Farewell - to a better Place (piano improvisation)
New to Xonotic? Check out the Newbie Corner!


With KDE there is so much configurable that you can turn it all off anyway. Some distros do have some poorly packaged and setup KDE packages which don't help. Moving to a modular rather than monolithic KDE is a big thing in itself as it allows you to install minus a lot of the stuff you won't need. Many people wrongly assume that just because your distro includes every single KDE application installed and turned on that KDE is always liek that! You can also switch your DE to running under a lighter windwo manager in a lot of cases.
I'm at least a reasonably tolerable person to be around - Narcopic

Yes, my KDE experiences were with ubuntu/kubuntu, where I always got the feeling as described above, resulting in constant 120% felt system load. I decided to use LXDE when I installed Arch Linux, and Arch requires you to install most stuff manually so I ended up with an environment that provides all I ever needed, and everything else doesn't work :o)
My Xonstats Profile
Latest track on soundcloud: Farewell - to a better Place (piano improvisation)
New to Xonotic? Check out the Newbie Corner!


I've now added some better instructions on disabling compositing for KDE, Compiz and Aero that people may wish to try and see what performance improvement they can get. I've also added some points on firmware updates.
I'm at least a reasonably tolerable person to be around - Narcopic

export force_s3tc_enable=true doesn't work for me. Says export isn't a word or something...

(08-26-2012, 03:17 PM)rocknroll237 Wrote: export force_s3tc_enable=true doesn't work for me. Says export isn't a word or something...

Huh? What shell are you using? export is part of POSIX.

Oh, I thought it was a cmd for Xonotic. But it's probably for the drivers... Smile

Is there a code that will do a similar thing but can be enabled in game?

Probably not, since it's a driver thing. Just type it in a terminal before you launch Xonotic (from the same terminal!) and if it works for you, add it to your .profile.

Nice guide!

Possibly Related Threads…
Thread Author Replies Views Last Post
  OpenGL 1.3 and 2.0: performance improvements but what are the differences? edh 3 7,257 05-20-2012, 04:22 PM
Last Post: edh
  Optimising 2 cores in OpenGL rocknroll237 6 7,603 04-14-2012, 01:18 PM
Last Post: rocknroll237
  Low fidelity graphics for best performance. Anarchee 2 5,235 02-21-2012, 05:12 AM
Last Post: Mr. Bougo
  Subtle Performance Tweaks Lee_Stricklin 6 10,279 12-15-2011, 07:09 AM
Last Post: Lee_Stricklin
  is this the best gaming computer? chooksta 12 15,679 03-04-2011, 06:40 AM
Last Post: chooksta

Forum Jump:

Users browsing this thread:
2 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-