Linux in Government: Optimizing Desktop Performance, Part II

Continuing to transform your Linux system into a fast desktop.
Reducing Color Usage

Today's Linux computer systems typically support 24-bit color, which translates to 16,777,216 colors. You might find that your system performs as well using 16-bit color, however, especially if you use virtual machines, such as VMware or rdesktop, to run Linux as a thin client on a Microsoft Terminal Server. You also can reduce the amount of memory dedicated to AGP Video chips and use that memory instead for system operations, especially if you need to squeeze resources such as RAM.

On Ubuntu, the default color settings are for 24-bit color. Changing that setting is a manual process. So, depending on your distribution, you can change the color depth from the command line:

su root or use sudo 
cd /etc/X11 or /etc/ 
edit  XF86Config-4 or xorg.conf 

depending on which X11 you have.

Scroll down to the section titled Screen and find the entry named DefaultDepth?. Change the setting you find there from 24 to 16.

In Fedora, you can change settings by selecting Launch->System Settings->Display and then changing the Color Depth to thousands of colors.

Back to

Last week we discussed the graphics cache for use with, as well as memory-per-object settings. This week we want to cover the issue of quick-starting's productivity suite. looks like a collection of separate programs such as a word processor and a spreadsheet program. We might consider it as being similar to Microsoft Office, where you can buy Word or Excel separately.

In actuality, consists of a single large application with different interfaces. Thus, it requires time to start the first application you use. When you launch OO Writer, for example, you might want to get a cup of coffee. But if you leave one of the applications open, you can open a new document quickly. The big application already exists in memory from when you started, in this case, OO Writer.

A couple of utilities exist that preload One, called Quickstarter or oooqs, exists for KDE; another, called ooqstart-gnome, exists for GNOME. We have not seen new development on the later utility, though, and it often causes an error message.

You also can use a built-in program called ooffice -quickstart, which you can start manually from the command line. The command is

$ ooffice -quickstart &

To use it, start ooffice -quickstart manually or have it launched automatically when you start your window manager or desktop. You then can start up your word processor, for example, work and then close the applications. But as soon as you close, the background quickstart process automatically dies.

The scripts used by oooqs and ooqstart-gnome do not experience this problem. So, you may want to use a script modified from Linux Desktop Hacks, published by O'Reilly & Associates. With this method we create a script and place it in a file called /usr/local/bin/oostay. The script looks like this:

# Restart ooffice -quickstart every time it exits
instances=`ps ax | grep -e -quickstart | grep -v grep | wc -l`
if [ $instances == 0 ]; then
while true; do ooffice -quickstart ; done
    exit 1

After creating it, make it executable with the following command:

# chmod +x /usr/local/bin/oostay

You can have it start when you logon to your desktop by specifying it in the Sessions dialog in GNOME, for example. See Figure 3.

Figure 3. ooffice -quickstart Every Time

Increasing Firefox Performance

Firefox running on Ubuntu seems to be slower than it is on Fedora Core 3 and some other Linux distributions. You can speed up its launch and rendering of Web pages, however, with a few changes. You have to open Firefox and in the address box type about:config. You then can use the about:config screen to tweak performance by increasing the maximum number of connections to different aspects of the network. Some setting to change and their values include:

network.http.max-connections                    128
network.http.max-connections-per-server            48
network.http.max-persistent-connections-per-proxy    24
network.http.max-persistent-connections-per-server    12

When you find a text string such as network.http.max-connections in the about:config screen, double-click the entry and a text box pops up allowing you to change the values. If you simply want to change a default from true to false, you can double-click the appropriate text string and the value changes. Each text string provides a status to the right of the property field. It displays either a default or user set status. So, you always can go back to the default settings.

For broadband users, Firefox responds to some changes in its default values for the following properties:


The default browser provides one request to a Web page at a time. Enabling pipelining makes several, which can speed up page loading. Alter the entries as follows:

  • Set network.http.pipelining to true.

  • Set network.http.proxy.pipelining to true.

  • Set network.http.pipelining.maxrequests to 30. This means it makes 30 requests at once.

  • Right-click anywhere on the about:config page and select New->Integer. Name it nglayout.initialpaint.delay and set its value to 0. The browser waits before it acts on information it receives; this changes the behavior so it acts immediately.



Comment viewing options

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

Superb Article

Zaheer M K's picture

Hello Tom Adelstein,
Congrats and thanks for writing such a cool, techy as well as simple article. Although I have been using GNU/Linux for around 3 years or now, this is the first time I got to do a performance upgrade on my m/c with the existing hardware, thanks to your 2 part article. I hope and wish that you be able to release more of such articles in the future. And I am right away sending the article to my local G/LUG mailing list. Thanking you once more.

Most effective Firefox tweak: Disable IPv6

Jonas B's picture

The probably the most effective tweak for snappy performance in firefox is to disable IPv6:

Check this link out for performing it in firefox:

For system wide effect in Ubuntu:

Google for other distros.. ;P

The links are gone.

Anonymous's picture

The links are dead.
I was surprised to find that Firefox still has ipv6 as enabled. This is *still* nonsensical for most users. There is simply not enough support for it on the WWW. IF you know for a fact that your DNS servers are using IPv6, then leave the setting alone.

To fix:
in the address bar
search(filter) for ipv6 and a line:
should appear.
If the disable ipv6 is set to false, double-click on the line to toggle the setting to true. That disables network dns IPv6 support in Firefox. Probably need to restart Firefox to activate...

openSUSE has a current link for info with a pic but it may soon move:

If/When the DNS Servers finally switch to IPv6, you can perform the same routine to switch back to enabling IPv6 support in Firefox ... or just get a new Firefox.

More Info on the IPv6 tweak and why it works

Keith Daniels's picture

I use FireFox 1.0.6 and Opera 8.02 constantly. They both had been displaying problems of slow access to web sites. After reading this comment I decided to try it and see what happened. It made a huge difference with FireFox under SuSE 9.0. I got a couple of friends to try it out and they did not get the same increase in speed that I did -- though they were using the FireFox and SuSE as I was.

On my system it made a big difference. The difference was in the "pause" right after you clicked on a link and some pauses while loading that are no longer there. It did not change the download speed or anything like that.

It had to be checking for an IPv6 link when it first tried the DNS server. That brought up the question of -- if that is the problem why did this fix only work on my system? I did some research and discovered that the ipv6 thing is not exactly a FireFox problem. Technically FireFox is working correctly. What seems to be the problem can be anyone of three things. Buggy DNS servers, buggy home routers and browser settings.

Some DNS servers are returning ipv4 results for an ipv6 request which causes FireFox to do multiple request -- which is the procedure specified by the standard. Other browsers are ignoring any bad ipv6 responses or considering them the same as no ipv6 address available (except for Opera 8.02) and don't have the delay problem.

Some home routers, which set themselves up as your DHCP and DNS servers, are doing something similar. Wireless routers seem to be the number one problem but regular routers can cause the problem also.

This means that you can get a delay of 4 to 5 seconds when your router is first accessed, then a similar delay when any buggy DNS server that is accessed during the load of a web site, returns a bad ipv6 result. This becomes a problem when the site you visit links you to several other servers that have to be looked up. An example would be the multiple ad servers at Yahoo.

Another issue that screws up figuring this out is that the OS itself could have ipv6 set on or off (mine was off) which means that if it is set to off, any test or anything run from the shell (like wget) will not have this problem. Makes it harder to debug.

I decided to play with my router and see if it was the main problem, since I just switched to DSL with a new router that was built in to the DSL modem. Before I did that, I decided to check my network settings and noticed that the old cable modem DNS servers were still listed in my settings. Since they could be buggy and the problem I decided to put in the new DNS servers used by the DSL provider. While thinking about how to find those IP addresses I noticed that there was an option of: "Update name servers and search list via DHCP" in my network settings. Hmmmmm I thought, this would be a great test to see if it is the router causing the problem since it is the DHCP server.

When I changed the settings to "Update name servers and search list via DHCP" which lets the router decide which DNS servers to use and probably activates a cache in the router -- the speed difference was amazing... Not only for FireFox but for Opera also. Now turning IPv6 on and off in FireFox makes no difference in speed.

Why this made such a difference I don't know but it has something to do with the way the router handles IPv6 when the router is in complete control of serving addresses through DNS. The router/modem is one of the latest, hottest, etc. (and most expensive) and has lots of state of the art features (four port router, wireless built in, DSL2+, etc) and may have advanced DNS selection and usage features (I say may because the manual is buried somewhere). So changing this setting on your system might not make the same speed difference with older routers. But if you are using a router with DSL or cable I recommend that you check your network and DNS server settings and try out "Update name servers and search list via DHCP" if you are not already using it.

Happiness is a hot connection...

All the new OSs and windowing systems are oriented towards content consumption instead of content production.

--Steve Daniels 2013

OpenOffice Quickstart

forrestcupp's picture

OpenOffice Quickstart is only useful if OO is the main software you use. All it does is preload it into memory, which leaves less memory for other software you use. Since you add it to the startup, it also increases startup time. If OpenOffice is what you are using all of the time, this is great, but if you use a lot of other software too, you might want to stay away from this. Unless you want to spend more money on more RAM.


Tom's picture

A controversy can be a contentious dispute, a disagreement over which parties are actively arguing. It can also be a disagreement or dispute over anything. Sometimes the controversy is actually hidden behind a veil of a comment used to discredit someone.

No doubt a controversy exists within the Linux community about the role of the desktop. That's correct within the Linux community. Some advocates feel that dumbing down Linux is a travesty - a debased or grotesque likeness. Others see Linux as an opportunity to bring freedom to users trapped by a monopoly.

In forums and on mailing lists where newbie users have moved from MS Win32 platforms to Linux, expectations often turn to disappointment and emotional outbursts. Thrawted expectations cause upsets. People want the freedom of Linux but don't understand that few things after the gift of life itself are free. If you want freedom, you may have to stretch a little and compromise.

This series seeks to compromise Linux by providing performance enhancements for the desktop. It doesn't aim to dumb down Linux completely. It's certainly not about the server side of the OS.

As a writer who changed genres six years ago and went from high finance, accounting and management articles and books to writing about free software, I have seen some interesting differences. Let's say that writing about free software has more controversy to it.

I encourage others to share the experience because as one person says - evil pervails when good men fail to act. Just remember that you'll need thick skin in this genre because the controversy remains ripe.

well. most of this is copied 1:1 from novell's linux desktop

tadelste's picture

In reply to your posting, I can assure you that the article, Linux in Government: Optimizing Desktop Performance, Part II was not copied from the Novell article you referenced. I know that because I wrote the article.

Both articles cover gnome to some extent. I chose a narrow coverage while Novell covered gnome extensively. I can see where you might feel confused because both articles have configuration commands executed on the command line.

The gconf 2 command line arguments are just that - command line arguments that can be replicated by clicks. The material used by Novell comes from various sources including Gnome Documentation. The documentation is open source /GPL.

If you take more than a cavalier look at both articles you can see that my topics cover a vast number of subjects not included in Novell's article. Further, they cover material I did not consider important for this series.

If you have questions about the origin of materials covered, please write to


Anonymous's picture

The Novell article is about gconf, gnome and X. He must have copied the word "performance". We really need to watch these writers.

well. most of this is copied 1:1 from novell's linux desktop

Anonymous's picture

What? No way.

well. most of this is copied 1:1 from novell's linux (sic)

Anonymous's picture

Went to the link you posted. I saw zero similarities between the articles. But the SUSE article is on the Sun site.

I would like to see some tips

Anonymous's picture

I would like to see some tips on reducing memory use of the Desktop & Applications. Yes, I know memory is cheap these days, but that is really only true for newer machines. On older machines, it is often impossible to find cheap compatible memory.

Something other than 'get better hardware' would be more helpful

Anonymous's picture

I agree. The laptop that I use works perfectly fine when running XP. It's relatively fast and responsive, and it's only a PII 400 with 128MB RAM. It's excruciating to use when running Linux / X / KDE or GNOME.

How about some tips on increasing performance and responsiveness other than the "throw more resources at it" as listed in the first two parts of this article.

Basically, both parts of the article have basically said "increase your Linux responsiveness and performance by upgrading your hardware" and then provide some information to ensure that the resources are being used.

Try not using KDE or Gnome

Anonymous's picture

There are many 'lightweight' window managers for most linux distributions. Try a few of them. Some such as fluxbox and blackbox are very minimal, giving reasonable performance on an old pentium.

I would like to see some tips

Anonymous's picture

Don't know what Tom would say about reducing memory use, but if you're experienced enough, you should consider recompiling you kernel and applications. You then have the flexibility of determining what to include and what not to include. The apps will also be more consistent with your hardware configuration.

hdparm -c: zero effect when using_dma=1

Mark Lord's picture

Hi, I wrote hdparm, and I wrote the Linux IDE Disk drivers. So I know how these things work.

"hdparm -c1" has ZERO effect when using DMA. None, nadda, nothing at all. The two code paths do NOT intersect within the kernel at all.


Ditto for "hdparm -m" when using_dma=1

Mark Lord's picture

Oh, ditto (as per my comment above) for "-m". Multisector mode (-m) applies only when NOT using DMA. Fiddling the setting while DMA is active has ZERO effect. None, nadda, not a shred of difference.



Kyle's picture

Hi Mark, I use hdparm all the time. I remember scouring the man page of a recent version and NOT finding simple performance recommendations, nor the inconsistencies you mention above. If a drive advertises its capabilities (and the bus supports it), I don't know why hdparm can't do this for us ( find the best performance settings).

I remember Mandrake had a package (harddrake?) that used hdparm to run thru all hdparm settings and test with hdparm -tT. Seems like hdparm could be doing this itself...

Ditto for "hdparm -m" when using_dma=1

Anonymous's picture

Hey Mark, thanks for writing the code(s) and for commenting for everyone. I enjoyed fiddling with hdparm because I got to know my computer a little better -especially the hard drive(s). The more I learn about Linux, the more impressed I am with the people who made it happen.


Agustín's picture

I am really enjoying this series of articles.I like the way the author explains things. It's just not to say "do that", but "do taht for so and so". I'm learning quite a few things. Thanks to Tom and to Linux Jornal Quickstarter

Serhat's picture

For my Xandros 3.0 system, I installed the Quickstarter applet that lives in the KDE's system tray. Right click on the icon offers an option to start the applet each time with KDE. By doing so no script is necessary to get the Quickstarter fired up. Quickstarter

Peter Schudt's picture

Hi Serhat. I installed the quickstarter-system and was doing a great job. But it also depends on how fast your machine is. When it is fast under Windows-XP, it will be lightning fast under Linux 8-)

Quickstarter can make your machine slower!

Petrus Vectorius's picture

There is 5 of us in the family, so each has one graphic virtual login screen. Now, Mandrake starts "oooqs" for each user, each taking 20MB, totaling 100MB out of on 512MB system - that is 20% system.

The result is that other applications are slower and are sapping more, fighting for memory with oooqs. Finally, most of the oooqs swaps out anyways and is as slow as before.

Killing all runnign oooqs actually makes the other applications on my system more responsive !


RES size?

Anonymous's picture

What's the actual amount of physical memory that each instance uses? (RES in top(1)) ?

Sometimes you can run many copies of a program and not use much physical RAM for each additional copy.

Some notes: - multisector

Anonymous's picture

Some notes:

- multisector mode makes no difference with DMA on. The difference shown might be just inter-run variation. Whether it actually hurts the reads from drive cache I can't say. Safest bet is that the value is just ignored.

- 16 bits display is not always faster than 32 bits. It depends on the display adapter in question (and application: if hardware 3D computes 24bit RGB data then conversion to 16 bits with dithering cost a bit extra). I would cautiously agree that in most cases it is faster, particularly on multihead systems where just drawing the screen consumes a lot of bandwidth. Generally this advice is not useful to people who have modern graphics adapters. 16-bit colours look distinctly crappy, and the value is dubious.

Some notes: - multisector

Anonymous's picture

I don't think the author intended to advocate anything in this section other than marginal spending on a hard drive might inprove performance.

Your 16 bit comment is out of context. Use of 16 bit mode has some applications depending on hardware and resources.


Anonymous's picture

This is a great series. Thanks! Perhaps in one article you could show me how to get Firefox to start quicker the first time it is opened after a boot up.


Stan's picture

I am realy enjoying this series. I tried some of those tweeks on Xandros 3 Pro and it definitly speeds up Open office start
I will try the hard disk sugestions from this weeks article
Just one question
I have Mozila installed not Firefox so will these quickload web pages tweeks work ?




Anonymous's picture

They work on Mozilla also.


Anonymous's picture

After investigating really poor performance issues with 4x10K RPM SCSI drives configured as RAID10 off an LSI Megaraid controller, I found that tweaking the kernel readahead settings using 'blockdev' makes a massive difference. Also, disabling this controller's own readahead seems to be important too. I found the best results were obtained by setting readahead on the block device 'closest' to the filesystem (i.e. whether that's /dev/hdxn, /dev/sdxn, /dev/mdn, or /dev/VolGroupnn/foo) and setting all block devices below it to 0.

As an example, the RAID I described above (which was achieving only 17-19MByte/s initially) now gets just shy of 100MByte/s, measured using bonnie++-1.03a. I still suspect there's some tuning to be done, though.

Linux in Government series

Peter's picture

Hi Tom, just a quick note to let you know I am enjoying this series of articles you are writing, the distro reviews and now this desktop optomising bit. I have learnt quite a few things and managed to speed up some of my daily work. The best gain I got was from the firefox tips.
Thanks, always looking forward to the next article.

Doing just one hdparm test af

Anonymous's picture

Doing just one hdparm test after changing the settings is stupid, it typically varies a few MB/s between runs with the same settings.

Doing just one hdparm test af

Anonymous's picture

Well I didn't think the exercise was stupid, but then I can read. I did find hdparm interesting and got value from it. I decided my hard drive was too old, too slow and caused my whole system to slow down. So like Tom said, I got a new one.

I have read Linux Journal for years because it's a pleasant break from the flaming threads on other web sites. Take what you need to from my comment. You can vent on many other web sites.

hdparm tests should not vary

Anonymous's picture

hdparm tests should not vary more than .5 Mb!
the difference between settings is obvious

Many of your options really m

Anonyumos's picture

Many of your options really made Mandy very responsive, this is great series, thanks

Firefox tweaks

Anonymous's picture

More on tweaking about:config in this article by Nigel McFarlane.

Don't you want to set nglayout.initialpaint.delay to your "best guess" about how long it will take Firefox to get a decent-sized chunk of HTML worth laying out, though? Otherwise I'm guessing that it will try to do layout while all it has is the HTML head and "steal" cycles from other apps.

Firefox tweaks

Tom's picture

A best guess is always a good place to start. Starting from zero isn't that bad either. We see a lot of fussiness on mailing lists and in forums about the slowness of Firefox. Indeed, some distributions see slower start ups than others. I noticed a big improvement with Ubuntu 5.04 at zero. I didn't notice much difference with Fedora Core 3 - but that distribution runs almost entirely in RAM on the machine I use.

You make an excellent point and we should all approach our desktops this way: try different settings and see if it helps. Then let people know what you've discovered.

Thanks for the comment!

On a 233MHz computer with 32M

Anonymous's picture

On a 233MHz computer with 32MB of RAM running Windows 98SE, Office 2000 will load in about 5 seconds. Too bad Windows 98 is unstable and Office is expensive- the speed of Microsoft products is really quite amazing sometimes. Even running under Wine, Office is faster than OOo.


George R.'s picture

Abiword starts much quicker than OO:Writer. But that's for only word processing.