Linux performance tips
To improve performance, especially on an under-powered personal
These were done on RedHat Fedora.
- Turn off unneeded services/daemons.
Use 'ntsysv' or the gnome desktop Main menu->System Settings->Server Settings->Services to deselect services. The services you need:
ntsysv doesn't kill running services, it's selections take effect the
next boot. The gnome Service Configuration can also terminate running
services. KDE has a similar app.
- anacron (runs scheduled jobs)
- iptables (only if you want a personal firewall)
- network (only if you want to connect to a network)
- pcmcia (only if you use the PC card slot)
- random (it's recommended but maybe unnecessary). Update: gone from
- syslog (for logging, I don't know if it's required). messagebus
- cpuspeed (to slow down CPU on laptop).
- readahead (pre-loads config files)
- acpid (for power management, laptops only? really needed?)
- xfs (X won't start without it)
Manually deselecting services: delete the Snnservice file in
Manually stopping service process:
- Run scheduled tasks less frequently.
cron/anacron runs scheduled
jobs based on files in /etc/cron.daily/. The worst is the slocate.cron
file which builds a database of all files and typically starts soon
after you've booted and ties up the disk for many minutes. This doesn't need daily
running on a personal system; move the file to the cron.weekly or even
mv /etc/cron.daily/slocate.cron /etc/cron.weekly/
Let the prelink scheduled job run. prelink does some manipulation
with the shared libraries so they load faster, thus programs start
Reduce the number of mingetty terminals from 6 to 1 or 0.
a virtual text-mode terminal. Accessible by ctrl-alt-f1
etc. (ctrl-alt-f7 is the X terminal). Not needed and unlikely to be
To see their running processes:
ps aux | grep mingetty
will show six of them running (corresponding to ctrl-alt
f1-f6). If they're killed they come back. Need to edit /etc/inittab
and put a # in front of lines
Takes effect next boot.
Install more RAM.
Don't run a bloated desktop like gnome or kde.
Try the fvwm2 window
manager instead. It will have to downloaded (1.2MB RPM file plus the
9KB libstroke RPM) from
fvwm.org, installed (rpm -i fvwm.....), and configured
into the login setup. (I can't figure out how to use it with gdm so
this setup uses kdm.)
Edit /etc/X11/xdm/Xsession to add this as another choice in the case
statement after line 108:
exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.fvwm"
(Notice it's similar to the surrounding choices.)
Add a line to /etc/sysconfig/desktop
Edit the /usr/share/apps/switchdesk/Xclient.fvwm file so that the
pathname in it is: /usr/bin/fvwm2 (i.e. remove the X11R6 component).
Kill the running gdm process. Or reboot.
fvwm can be configured to look better...
Fedora 3 provides xfce window manager instead. Version 4 is better
than the provided version 3 (menus, hotkeys can replace mousing, and can run xplanet on desktop).
Triage on extremely under-powered system: don't run X, run in
'telinit 3' will switch to runlevel 3 which is
text-mode. Runlevel 5 is the default X-based mode. The line in
/etc/inittab that looks like:
controls which runlevel the system boots up in. Change the 5 to a 3
so subsequent boots are in runlevel 3 (text-mode only).
Can do anything non-graphical.
Recompile the kernel so it's lean and mean, tailored to your system's
hardware and applications. I don't know how much performance this adds.