Don't run a window manager (wm). Some wm's like twm don't
take up much CPU cycles, but still rob you of performance. Some window managers
like enlightenment will definitely produce a noticeable slow down. To run a game
without a wm, you modify .xinitrc in your home directory. Here is what my .xinitrc
looks like:
#quake3 +set r_gldriver libGR.so.1
#/usr/local/games/SinDemo/Sin
#exec ut
#lsdldoom -server 2
#exec tribes2
exec /usr/bin/enlightenment
|
This file tells X what client to run upon starting. Usually this is your wm,
and/or a desktop manager (GNOME or KDE). Comment out the lines containing a wm and
desktop manager with a pound sign (#) and place your game on a new line with any
command line arguments you want to pass. If the game is not located in your $PATH,
give its full path name. Note that this is for people who use `startx' to start X.
I never use things like gdm or run-level 5 (so I'm not positive here), but I
suspect that if you do, you'll need to do things a bit differently. My best guess is
to go to single user mode (run-level 1) by:
then edit .xinitrc, then go back to run-level 5 by
Then when you stop playing, go to run-level 1, modify .xinitrc then go back to
run-level 5. I don't use this stuff, so I'm not sure, but you may need to kill gdm.
I'd appreciate some feedback on this.
Kill all not-essential processes. Of course you'll have to do this as root. A
better way to do this than typing "ps ax", getting ntpd's pid, and sending it a
SIGKILL (with kill -9) is to make use of pidof:
However, an even better alternative is to use the startup scripts on your
system. On Debian, the startup scripts for run-level 2 are located in /etc/rc2.d/.
You can kill a service in an orderly manner by sending its startup scrip the `stop'
command:
# cd /etc/rc2.d
# ./ntpd stop
|
Another (radical) option is to simply put yourself in single-user mode with
This will even get rid of getty; your system will be running nothing which is
absolutely crucial to its operation. You'll have something like 10 processes running.
The downside is that you'll have to play the game as root. But your process table
will be a ghost town, and all that extra CPU will go straight to your game.