Maximize Desktop Speed

Are you a speed junkie who wants the fastest, most responsive machine? Try these changes and get even more speed out of your Linux box.

One of the best things about Linux is that you can get much more performance out of the same computer than with other operating systems. However, there always is room for improvement, and you should be able to get a bit more speed out of your box by applying some specific enhancements.

Don't expect miracles, however. No amount of tweaking can turn a Pentium II into a Quad Core monster (remember the old saying about silk purses and sow's ears?), but you can expect to get a more responsive machine that “handles” better. Although some of the changes are internal and hard to see, you will find that your system feels livelier, your clicks produce answers faster, you can switch between applications more quickly and programs run in less time.

Let's be practical. If you get a better CPU, there's probably nothing in this article that will match your results, and the same goes for a better graphics card or speedier disks. But, you expected that, didn't you? (Making such hardware upgrades would benefit not only Linux, but also every other operating system out there.) However, making such changes are practically the equivalent to getting a whole new machine, so you wouldn't be really enhancing the performance of your old box, but starting anew.

That said, this article discusses configuration changes with the aim to leave everything (well, almost everything) as it was but make it perform better. Of course, these changes aren't all equal; some are more difficult (and riskier), some require rebooting or other procedures, and some even require delving into the command line and editing configuration files. But, don't give up. The results are worth it.

As a final note, I use OpenSUSE (version 10.3) and KDE for the examples in this article. If you are using other distributions or desktop environments, you will find small differences in file locations or procedures. Currently, because most distributions offer exactly the same packages and drivers, one of the largest remaining differences between them is precisely in the configuration tools, so you may need to do some searching on your own. In any case, it's a safe bet you will find a way to manage anything described here, only in a different way.


Similar to the old real-estate adage “Location, location, location”, getting more RAM, RAM, RAM will provide a great improvement. All processes need memory, and whenever the kernel runs out of RAM, it starts swapping to disk, but as this is orders of magnitude slower, your performance takes a hit. If you are willing to spend something, don't hesitate. Go out and get some extra RAM sticks for your machine. As soon as you plug them in, you will notice better performance. Getting more RAM isn't very costly, and it doesn't require any configuration or re-installation.

Even if you don't want to spend the money for more RAM, you can make Linux manage the available RAM in a more efficient way. Here are some simple changes to consider:

  • Change from KDE or GNOME to a lighter desktop environment. GNOME is about the worst in terms of RAM requirements (although it's far below that of Windows Vista), and KDE is a close second. Try using a less-demanding environment, such as Xfce or Enlightenment, which is used in gOS, the operating system pre-installed in the Everex Green gPCs sold at Wal-Mart [see Doc Searls' interview with David Liu on page 58 for more on the gOS]. Other possibilities include IceWM, Blackbox, Fluxbox, Fvwm, JWM or (the now seemingly defunct) Window Maker. Note that these window managers are not exactly equivalent to having a full desktop environment, so you will have to adapt a bit. Plenty popular distributions, such as DSL (Damn Small Linux) or Puppy Linux use these lightweight window managers, and many are available as optional packages for Red Hat or SUSE.

  • Get rid of fonts you never use. I was once a fonts junkie and loaded my box with several hundred fonts (I'm not exaggerating) just in case I might use them some day. Each font requires memory, and the fewer fonts you have, the more RAM you will free. And, some programs will run faster, because they will have shorter lists of fonts to load.

  • Reduce the number of virtual desktops. Windows users work with only one desktop, but do you really need 16 virtual desktops in Linux? Experiment a bit with this. I wouldn't go down to one desktop, but most of the time, having two or three virtual desktops is more than enough.

Getting Too Swappy?

Linux (as most other, if not all, modern operating systems) uses a technique called Virtual Memory to give programs the impression that they have plenty of memory available, even more than the actual RAM size of the machine. This technique implies using disk memory (the /swap partition) to simulate actual RAM, swapping pieces back and forth. Of course, whenever this swapping process runs, you will experience longer response times and slower performance.

The kernel tries to prevent future swapping by doing some of it in advance, and you can alter the degree to which this is done by changing a parameter from 0 (minimum swapping, done only if needed) to 100 (try to free as much RAM as possible).

There are two ways to change this. The standard value is set at 60. To lower it, as root, do something like:

sysctl -w vm.swappiness=25



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How to get rid of fonts?

Roland's picture

OK, so 'xfontsel' shows I have over 10K fonts. Many of the families are clearly foreign languages, that came with install. How do I get rid of some of them? 'apropos font' was no help, and 'adept' indicated I didn't have any font packages installed. I use Kubuntu. 'man apt-get' didn't give me a clue about finding font packages. Suggestions? Thanks.

Wrong information about prelink

sspr's picture

The section about prelink is incorrectly stating that...

Using prelink in this way obviously requires more disk space (for there will be a copy of every prelinked library within each executable file), but with the current large disks, this won't even be noticed.

This is complete rubbish ! The author is clearly confusing rewriting the relocation tables with hard-wiring the libraries in executables. The scheme set up by the author would turn all binaries into static linked programs. Nothing is less true ! As a simple peek at the man page (or even Wikipedia) reveals, only the relocation tables are rewritten such that when a library is loaded into memory, it's symbols sits at the right spot in the virtual memory, such that the calculation of the symbol locations no longer needs to be done, but is exactly there where the program expects them.

So prelinking does not use a single byte (apart from the lightweight checksum mechanism) more disk space.

Another blatant fault:

Include the -m option so prelink will try to conserve memory, if you have many libraries in your system (highly likely) and not a very large memory.

This has *nothing* to do with your actual memory, but with the 4GB virtual address space limit on 32bit systems ! It just means that, _if_ each library was used in a single program (and that's what prelink allows without the -m option), you'd exceed the virtual address space limit. The solution is to see which libraries are mutually exclusive linked and let them overlap in virtual memory, as they'll never occur at the same time in the same process.

This article is also quite mediocre in the section about compiling a kernel, you're supposed to know how many RAM your system has. Wrong again. It's perfectly safe/performant to turn on "High Memory Support (4GB)", even if you only got 1GB. And the instructions for compiling a kernel are of the lesser quality I've seen around. You, a daring non-kernel hacking user, should nowadays only install a kernel through your packaging system (like make-kpkg for Debian/Ubuntu) and not using the good old 'make' command, which might as well overwrite your current kernel image and leave your system in an unbootable state (for example, when initrd support has been omitted and your filesystem drivers are compiled as modules.)

This article had good intentions, but the proof reading (if any) clearly missed some faults.