Howto: Set up Edgy for speed

It’s been a long time coming, but I think I’m finally content with a fresh array of Edgy speed tweaks.

These are mostly the result of working with sub-1Ghz machines that needed every crutch available to make them spunky, but it’s also a result of working with Arch linux early in my Ubuntu experience. After you’ve seen the speed and response you can get from an Arch build, you start to wonder why the same machine doesn’t behave like that in Ubuntu.

Regardless of the reasons, Ubuntu has a lot of bonuses that Arch lacks. It doesn’t merit listing them here, since ultimately the downside of one distro is a perk in another — and vice versa. And this isn’t a comparison any more — it’s a healthy rack of tweaks that would/should/could make an Edgy Ubuntu build spunky and fun.

I’m putting this together as a series of steps, rather than a list of tweaks. There’s a good reason for that; the bulk of these things are best performed in order, with some things happening early on, and others happening at the end of the construction.

Perhaps more importantly, these were never my ideas — only ideas posted on the forums that I adapted or tested in Edgy, and modified to work with the newest distribution of Ubuntu.

The final product (that I like to make) is an Edgy build that uses Openbox 3.3.1 with feh to manage the desktop background, xfce4-terminal as an interface with the system, ObMenu to manage Openbox’s menu applications, Iceweasel as a browser, iDesk for a little bit of splash and XFE as a file manager. All of these were picked because they have low system loads and are easy to put together without too much hassle.

I’ve built these systems on a variety of hardware. I used the core elements of this to put together a 75Mhz Ubuntu box, a 120Mhz Pentium system, a 300Mhz laptop for my mom to use, a 750Mhz laptop for music and movies, a 1Ghz desktop for gaming (you laugh, but I can run NWN at 1280×1024 on that 🙂 ) and a 2.26Ghz see-if-you-can-break-it machine.

The results depend on the hardware, as you might imagine. But my proudest achievements are the fact that the 75Mhz Pentium build gets to the desktop on less than 22Mb (19Mb for the 300Mhz laptop!) and the 2.26Ghz machine goes from the Grub menu to the desktop in 27 seconds. It’s a joy to watch.

As with anything in life, there needs to be a disclaimer or two. First, your mileage may vary. What works for me might be absolute rubbish for you. Along those lines, try these things and see what happens, but don’t feel like my way is the best way.

Furthermore, I’m not a Linux expert. My Ubuntu experience began barely a year ago, and that’s a speck in the grand scheme of Linux things. Google is my co-pilot, and I learn by breaking things.

Next, there is the real possibility of screwing things up by using these tweaks. Be prepared to start over from scratch. Back up everything important. Don’t be timid, but don’t be foolhardy either. This is how we learn.

Finally, feel free to speak up. If you have a question, ask it. If you have a suggestion, make it. If you have a correction, give it. We’re all in this together.

I’m going to pitch this as if you were building an Ubuntu-only (in other words, not a dual boot) 1Ghz desktop machine, with 256Mb of memory, onboard Intel graphics to a single monitor, a standard IDE hard drive and CDROM, an integrated network connection to broadband net access and integrated sound. This is a happy medium for most run-of-the-mill desktop machines and mid-grade laptops. If your hardware varies much from this, you’ll have to knock around the inside of your system to get the best performance. (I’m speaking figuratively there. 😉 ) If you’re using cutting edge hardware … it should go without saying that you’re on your own.

Start clean

First, start with a clean slate. Download a copy of Killdisk and blank the drive. I say this because installing over top of an old system can occasionally confuse your machine; I’ve had it happen to me. In my experience, starting with a perfectly blank drive is the best way.


Once the drive is blank and ready, boot the Ubuntu desktop CD or a copy of Damn Small Linux — anything that will give you a live environment. We need to be able to access the hard drive before we start installing the system.

Open a terminal and enter this command.

sudo fdisk -l

This will give you a list of your attached drives and their designations. Determine which drive is your primary master, and use its designation in the next series of commands. For the example machine, I’ll use /dev/hda — which is probably the same as yours.

sudo cfdisk /dev/hda

I like cfdisk over fdisk only because it’s easier for me to spot errors. If you prefer fdisk or another partitioning tool, please feel free to use it.

Build a partition scheme like this one.

  • /dev/hda1 Primary 96Mb Linux Bootable (/boot)
  • /dev/hda2 Primary 2048Mb Linux (root)
  • /dev/hda5 Logical 256Mb Linux Swap/Solaris (swap)
  • /dev/hda4 Primary 8192Mb Linux (/home)

A couple of notes. I keep my swap partitions small. I use the same amount of space for the swap as I have available memory in the machine. I very rarely use swap space; in fact, later on I’ll turn off swapping in an effort to avoid I/O delays and eke a little more speed out of the box. How much you use is up to you, but remember that your machine is probably going to boot on less than 54Mb of memory.

For the home partition, use whatever space is left to you.

I usually build partitions this way only because I sometimes experiment with different file systems, and Grub doesn’t like to boot some file system types. If I decide at some point that I want an xfs root partition, I don’t have to think twice about it.

Don’t ask me why I set the swap partition to logical. Old habits, I guess. Once a long time ago I set everything to primary, then checked to see if it was making a difference. It wasn’t.

Write that partition table to the disk and quit cfdisk.

File systems

Now it’s time to set file systems. File systems are funny things: What works wonderfully on one machine will be a real dog on another. The reason is that some file systems are more of a burden on the processor, while others are more of a burden on the I/O channel. There’s a much better explanation here; the basic idea is to pick a file system that works best with your CPU and connecting hardware. Each file system has its fan club and each fan club will tell you how great it is, but again, it’s up to you and your hardware. Try two or three and see what’s fastest for you.

On a 1Ghz machine (and slower), ext3 is the ticket. In my experience, slow processors need simple file systems. Fast processors benefit from other, more complex file systems.

Set the boot partition to ext2 (that’s right, ext2 — not ext3) with this command.

sudo mke2fs /dev/hda1

Now initialize the swap partition with this one.

sudo mkswap /dev/hda5

Now comes the fun part. We’re going to set the file system on the root partition and the home partition to ext3 with the dir_index option enabled. It’s another little tweak that works great with older machines.

sudo mke2fs -j -O dir_index /dev/hda2 sudo mke2fs -j -O dir_index /dev/hda4

The -j option sets the file system to ext3 instead of just ext2. The -O triggers the dir_index option.

Those commands will take a little bit to finish. When they’re done, we’re ready to install.


Reboot and start up the Edgy alternate CD. At the opening menu, pick “Install a command-line system” — a server installation.

You’re on your own for most of the installation, but when you reach the partitioner, make sure you assign the partitions to the mount points shown above.

After the installation is finished, you’ll need to reboot, and if all went well you’ll be greeted with a login prompt. The first thing you should do at this point is to enable the multiverse and universe repositories, since you’re going to want them later.

Here’s the sources.list file I use; I generated it a while back with’s Source-o-matic, and updated it to edgy.

# Automatically generated sources.list 
# If you get errors about missing keys, lookup the key in this file 
# and run these commands (replace KEY with the key number) 
# gpg --keyserver --recv KEY 
# gpg --export --armor KEY | sudo apt-key add -

# Ubuntu supported packages (packages, GPG key: 437D05B5) 
deb edgy main restricted 
deb edgy-updates main restricted 
deb edgy-security main restricted 

# Ubuntu supported packages (sources, GPG key: 437D05B5) 
deb-src edgy main restricted 
deb-src edgy-updates main restricted 
deb-src edgy-security main restricted 

# Ubuntu community supported packages (packages, GPG key: 437D05B5) 
deb edgy universe multiverse 
deb edgy-updates universe multiverse 
deb edgy-security universe multiverse 

# Ubuntu community supported packages (sources, GPG key: 437D05B5) 
deb-src edgy universe multiverse 
deb-src edgy-updates universe multiverse 
deb-src edgy-security universe multiverse 
# Ubuntu commercial provided by Canonical 
deb edgy-commercial main

# Ubuntu backports project (GPG key: 437D05B5) 
deb edgy-backports main restricted universe multiverse 
deb-src edgy-backports main restricted universe multiverse

Now update and upgrade.

sudo aptitude update && sudo aptitude -y dist-upgrade

Now let’s finish tampering with the file systems.

File system tweaks

Two more tweaks to the file system will keep your ext3 machine running fast: The journal_data_writeback option, and the noatime option. We need to set these in Grub, in fstab, and by enabling the option with tune2fs.

First, open the Grub boot menu.

sudo nano -w /boot/grub/menu.lst

Look for the two options sections, and edit them to look like this. (Important: Leave that initial hash mark in there!)

# defoptions=rootflags=data=writeback elevator=cfq

And this. (Important: Leave that initial hash mark in there!)

# altoptions=(recovery mode) single rootflags=data=writeback elevator=cfq

Under defoptions, I took out splash and quiet. First, I like to see the terminal commands scroll by, so I don’t want the quiet option. Second, there’s no splash screen to speak of, so it’s safe to take that out.

root=data=writeback is the file system option we’re going to set. elevator=cfq is another tweak that adjusts the queueing. It sometimes gives me a tiny improvement, depending on the hardware and the I/O load.

Since we’ve altered the boot options, we need to update Grub.

sudo update-grub

Now let’s alter the fstab so it expects those options. Enter this into a terminal.

sudo nano -w /etc/fstab

This part is a little tricky. Edgy assigns a smear of UUID codes to the fstab entries, which makes them a little difficult to manage. Alter your lines for /dev/hda2 and /dev/hda4 like this.

# /dev/hda2 UUID=82eaeb0f-9df6-4129-a075-d98657d2e619 / ext3 defaults,errors=remount-ro,data=writeback,noatime 0 
# /dev/hda4 UUID=8725b47c-c92e-48bb-9aa7-32ee39befc35 /home ext3 defaults,data=writeback,noatime 0 2

It’s possible your UUID numbers will be different, so don’t just cut-and-paste these lines into your fstab. Add the data=writeback and noatime flags to those partitions, where you see the defaults term.

Now that both Grub and fstab are ready, we can add the actual flag to the file systems.

sudo tune2fs -o journal_data_writeback /dev/hda2 
sudo tune2fs -o journal_data_writeback /dev/hda4

Excellent! Now we’re ready to move on.

Concurrent boot

Thanks to boban for this excellent tweak. Edgy’s concurrent boot settings are in the /etc/init.d/rc file. Dig through that file and look for the CONCURRENCY option.

sudo nano /etc/init.d/rc

Change it from none to shell. On reboot, it will take effect.

Processor-specific kernel

Edgy works its processor kernels a little different. Dapper used 386 as the default, with 686, k7, and 686-smp as options.

Edgy goes straight to 686-smp as the generic. If you have an nvidia card installed, you’ll see that your kernel went to the 386 version.

From what I’ve seen thus far, switching kernels doesn’t help out much. It’s possible that someone can offer a little more help here, but from my experience, the kernel edgy picks is just fine.

Toss out dead weight

Now let’s throw out some junk. Depending on your hardware you may or may not need some packages that Ubuntu installed by default. We can throw them out, along with their metapackages, and save a small bit of drive space — and perhaps a little boot time too.

Here’s a rough list of packages that I generally don’t use on the mythical 1Ghz desktop I described. This is another one you probably shouldn’t cut and paste. 😉

ubuntu-standard evms evms-ncurses hdparm lvm2 lvm-common mdadm ppp pppconfig pppoeconf rsync ubuntu-minimal jfsutils pcmciautils reiser4progs usbutils vim wireless-tools wpasupplicant xfsprogs

Your hardware is what determines what packages you really need. For example, if you’re working with a machine that predates USB technology, by all means throw out usbutils. If you’re on a desktop, you don’t need pcmciautils, and you probably don’t need wireless-tools or wpasupplicant. That’s up to you. Otherwise, keep them on hand or things start to break.

ubuntu-minimal and ubuntu-standard are metapackages — kind of like capsules that hold the other packages in place. If you try to take out just jfsutils, for example, ubuntu-minimal will complain. So to take out any one of those, you have to take out its metapackage too.

One last note: If you don’t want sound, throw out alsa-utils and alsa-base. And remember, if you want or like something I’ve listed here (vim fans!), feel free to keep it.

Prelink, preload and readahead

These three packages do a little looking ahead while you’re using your machine. (readahead is not part of the server installation.)

sudo aptitude install prelink preload readahead

Prelink requires a little editing to get it going.

sudo nano /etc/default/prelink

Change PRELINKING to yes, then trigger the option through cron

sudo /etc/cron.daily/prelink

The default readahead settings are acceptable in Edgy; there was a tweak for the Dapper version that seems to have become the default under 6.10.


Now it’s time for a few more tweaks. vm.swappiness controls how frequently your machine swaps out to the hard drive. Setting it to 100, the highest, allows swapping to take place quite frequently. This is probably good on a machine where memory is tight.

However, the example machine is going to boot on less than 64Mb, and so long as there’s plenty of space to get the job done, there’s no need to allow swapping. Let’s set vm.swappiness to 0.

sudo nano /etc/sysctl.conf

At the bottom of that file, add this line.


Since we’re in here already, let’s tweak our network access for broadband. Copy and paste this into your sysctl.conf file. Anywhere is fine.

# Tweaks for faster broadband... 
net.core.rmem_default = 524288 
net.core.rmem_max = 524288 
net.core.wmem_default = 524288 
net.core.wmem_max = 524288 
net.ipv4.tcp_wmem = 4096 87380 524288 
net.ipv4.tcp_rmem = 4096 87380 524288 
net.ipv4.tcp_mem = 524288 524288 524288 
net.ipv4.tcp_rfc1337 = 1 
net.ipv4.ip_no_pmtu_disc = 0 
net.ipv4.tcp_sack = 1 
net.ipv4.tcp_fack = 1 
net.ipv4.tcp_window_scaling = 1 
net.ipv4.tcp_timestamps = 1 
net.ipv4.tcp_ecn = 0 
net.ipv4.route.flush = 1

Now reset sysctl to accept the new options.

sudo sysctl -p

Disable ipv6

Since we’re tweaking our internet options, we might as well turn off ipv6. Open a new file with this command.

sudo nano /etc/modprobe.d/bad_list

Paste this line into it and close it.

alias net-pf-10 off

There are other ways to do this, but they seem more complicated.


This can be a rather lengthy task. The next thing to do is to disable how some services are handled on startup and shutdown, and what runlevels they perform at (if at all).

You might choose to omit this step. It can be very time-consuming (comparatively speaking), and not knowing enough about just one service can result in a broken system.

First, install sysv-rc-conf.

sudo aptitude install sysv-rc-conf

Invoke it.

sudo sysv-rc-conf

At this point, you have the ability to disable a service completely, and this is another tweak that will depend upon your hardware to finish. There is a good list of services here, and suggestions to what you can safely disable.

Next, tamper with the file names in /etc/rc.0 and /etc/rc6.d to control what is managed at startup and shutdown. In general it’s safe to put lowercase letters on the same services you disabled with sysv-rc-conf. I’m sorry there’s so little detail here, but each machine is going to be different, and too many arbitrary instructions could break your rig.

Almost done

At this point, what you do with your system is a bit up in the air. Myself, I prefer Openbox and Iceweasel these days, because they keep with the speed idea, and work fantastic on older machines. (If you do use Openbox, check up on the option to autologin without a login manager, which saves some time on startup. But don’t bother with it if you feel that might be a security risk.)

On the other hand there’s nothing to keep you from installing kubuntu-desktop or ubuntu-desktop and creating a full Gnome or KDE environment. What you do this far is up to you.

Last steps

There are two more things you can do with your system, and really they should be done last, when everything is in place.

First, grab that DSL or Ubuntu live CD you started with, and reboot your machine again. Open a terminal window and enter these commands.

sudo e2fsck -fD /dev/hda2 sudo e2fsck -fD /dev/hda4

This will reoptimize the root and home directories, and can take a little while to finish.

When it’s done, reboot and press escape when you see the Grub boot menu. Edit the topmost option and add this word at the end of the boot line


Press return to finish editing and then b to boot that line. Your system will reprofile itself on this boot (and this boot only), and successive boots should be faster.

All done

That’s it. Reboot a final time and see how it goes. If you have any ideas or problems, feel free to tell about them.

P.S.: A word about ramdisks

In my experience, ramdisks can be good things, but they don’t seem to speed things up like you’d think they would. But they’re always worth a try. As an example, there’s a good thread about setting up a ramdisk for Firefox here.


45 thoughts on “Howto: Set up Edgy for speed

  1. SonWon


    You can pickup a little speed boast by making the the swap partition the last partition on the hard drive. This area of the hard drive has the highest read/write speed. This will likely vary from drive to drive. Best is a seperate drive for swap, last partition, and on the fastest drive.

  2. kmandla Post author

    Good idea. Right now I’m running on machines that either can’t hold or just don’t support a second hard drive, but you’re absolutely right. It’s a great idea for Windows machines too, and something I used to do reguarly when I set up a WinXP build. Thanks!

  3. Jeremy

    Actually, the kernel that Edgy picks is generally linux-generic. I guess you’ll only get that SMP kernel if you’ve got dual processors.

  4. kmandla Post author

    That’s the part I find confusing in Edgy.

    If I give uname -a to my little 750Mhz laptop, I get “2.6.17-10-generic #2 SMP” in the output. linux-686-smp in the Edgy packages says “Obsoleted by: linux-image-generic.” And linux-generic, which is installed as the default, is a container for linux-image-generic and linux-restricted-modules-generic.

    So I’m a bit bewildered, but it seems to me that the logic is reversed from Dapper, where it started with the 386, with the option to move to 686, k7, 686-smp and so forth. Now it seems we start with smp support and can move down if need be.

    If someone can set me straight on this, I would be mighty thankful. 🙂

  5. Wei

    Nice guide. I thought first this is an article how to optimize edgy on the base that it is installed already :). I guess HOWTO: Install and set up Edgy for speed would make title more attractive.

  6. kmandla Post author

    Thanks. That’s possibly a better title. If there’s a Feisty guide, I’ll make sure it’s clear.

    Most of these tweaks — I think setting the dir_index option is the only holdout — could be done on a preinstalled system, too. And you could probably set dir_index in a live CD environment, although I haven’t tried that. Cheers!

  7. The Trekkie

    Interesting Guide. I’m not sure what did it, though, but my system started mounting itself read only after I followed the instructions here; I had to go into Grub and change the “ro” to “rw” to make my system usable again.

  8. kmandla Post author

    Hi Trekkie. I’m not sure why that would have happened. You’ve probably already checked, but make sure your menu.lst file is correct, and that you ran sudo update-grub after you set the file system. If the file system is set to journal_data_writeback but grub didn’t get the data=writeback rootflag, grub might think it has found an error, and might set the file system as read-only.

    My only other suggestion is to check your fstab and make sure there’s no typo in the line for your root drive. Cheers!

  9. greg

    Hello. Thanks for the great info on the site. I am a relative ubuntu/linux be gentle. 🙂
    I have performed all of the steps above. However. I am still stuck with a login prompt and password. I then login and nothing happens. I guess I do not know how to get in from the doslike prompt back to kde/xfce etc.
    I tried to install xfce, but the installation told me that I ran out of room. I think its trying to install all of the files into the root directory. Once I installed xfce I tried the command “sudo /etc/init.d/xfce start and I also tried kde start and gdm start. nothing happens other than an error saying that its not installed.

    I am installing 6.1 on an HP n3270 notebook computer, 248mb ram(6 to video), 12 GB HD, DVD-ROM. I want to be able to browse the internet, basic word processing, and anything else it does would be a bonus. Any advice you can give is greatly appreciated. Thanks!

  10. kmandla Post author

    Hi Greg. After the text login prompt (which will probably be somewhat lost in the startup garble, if you set the concurrency to shell), enter startx and the X window system should begin.

    XFCE is usually started with the command startxfce4, but if your XFCE installation ran out of room, you’re probably missing parts of it, so I don’t know if I would try it.

    sudo /etc/init.d/gdm start and /sudo /etc/init.d/kdm start are only going to work if you installed GDM or KDM, which, if it were me, I would avoid on a machine of that era. They come with a lot of bulk, and slow things down in my experience.

    If you run into problems, post a thread on the Ubuntu forums and PM me there, and I’ll do what I can to help. It’s a little more expedient there, and there’s the added benefit of higher traffic. Cheers and thanks!

  11. w

    # defoptions=rootflags=data=writeback elevator=cfq

    I’d stress that this # will have to stay in front of that line (VERY unusual behaviour for *nix conf file!) – had some hard times with it, trying to figure out why it’s not working. I just assumed You had made a typo not removing it from there 🙂

  12. kmandla Post author

    Excellent point. I’ll make sure it’s added in the next guide, and add a note to this one. It’s reflex to take out that first hash mark. Cheers!

  13. CanOsoup

    I was planning on making an old computer of mine Linux to experiment with and I have already faced a problem. When I boot up the computer, the Live CD doesn’t come up like it does on my main computer?

  14. kmandla Post author

    Hi CanOsoup. If it’s really old, it might not boot from the CD drive; check in the BIOS to see if it will support it.

    And if it’s an old machine you might want to try the live CD on something newer. The live CD generally needs around 256Mb to get started, and if your old computer has less than that, it might struggle.

    There is a text-based installer CD for Ubuntu available at … Have fun!

  15. LongMan

    Thank you very much for your guide.

    My internet connection is not unlimited. So i download files with attention 🙂

    I’m from Russia 🙂

    I’m new to Ubuntu and i very like it. And with such people as you in The Feisty Fawn Testing Team it will grow smarter and faster.

    Thank you again and again!

    Alexey Gusev (mo.longman at

  16. NerdyShinobi

    Really neat guide…works for the most part just like it seems it should. The only issue I’ve had at all has been the fact that Ubuntu just LOVES to install Gnome in it’s entirety the moment I want to install something merely Gnomish, such as Banshee.

    I initially did this on my wife’s laptop…got things to a workable condition, seems a bit snappier. I don’t really know enough to start weeding out services and such.

    As I worked, though, I realized that what you’ve started here is really similar to the nLite project for windows, in reverse. Instead of stripping down, you are building up from an established base. Oh well, enough of my blathering.

    Great Guide!!

  17. Mahmood

    Hi, this is an excellent guide. I am also a newbie, so please tolerate! I am woundering if this guide would similarly applies to installation of a Simply Mepis linux system. I already have this intalled on my old (1MHz) computer as a dual boot system. However, I know that I’d have to reinstall from a live CD, because it seems my system has some flaws in it.
    Would you advise please?
    Thanks in advance.

  18. K.Mandla Post author

    Hi Mahmood! Thank you! Yes, I think this will work on Mepis; if I remember right, Mepis is based on Ubuntu, so most of it should apply. I haven’t used Mepis before, so some things might be different, but you will know better than me. 🙂

    In fact, most of it will work with any distro. I use the filesystems, partitioning and e2fsck tweak with my Arch systems. However, there are some things that are specific to Debian/Ubuntu/etc. (like concurrency=shell), so you should look closely.

    Have fun! 😀

  19. Pingback: Ubuntu Customisation & Tweaks Part I - Documentation at kepo-ing Zz85

  20. Alex

    Thanks, I’ve picked up a couple of nice hacks! I’m working the day before yesterday’s technology so I’ve got to trim off al lthe fat I can.

  21. Sindhudweep Sarkar

    Setting up SWAP as the last partition of the drive will SLOW YOUR SYSTEM DOWN. The reason is with constant angular velocity drives (like hard drives) sectors are numbered starting from the outside of the disk.

    Sector 0 on a CDROM maybe on the inside, but CDROM’s are constant linear velocity drives (variable rpm) so it doesn’t matter anyways.

    So if you want your SWAP partition to be in the fastest part of the disk it should be closer to sector 0.

  22. guest

    I cannot boot anymore after editing /etc/fstab. I tried to return old settings but the drive is in read-only mode and won’t mount in rw!

    Can you explain this? I’m sure there is no typos, I’m always using ‘copy-paste’ way when we are talkin’ for *NIX commands.

    After that I tried with Ubuntu Live-CD, mount /dev/hda1 in /media and fix the mess

  23. gunnix

    What apps do you use on those slow computers? You look like an interesting fellow 🙂

    My experience with openbox is that it isn’t so fast on my p1 as fluxbox, icewm, ratpoison, .. Still ofcourse openbox looks good, definately with a transparent pypanel, nice for making screenshots. Can you actually use the 75mhz enjoyably with openbox? I wonder..

  24. K.Mandla Post author

    Hi gunnix. I think for the day or so I played with that 75Mhz machine, I tinkered with Openbox and Xfe, and maybe a terminal program or two.

    In retrospect, knowing a little more now, I think I would use something like Lowarch over Ubuntu, and stick with exceedingly lightweight apps like Dillo, or terminal based apps for anything else.

    The 75Mhz machine was mostly an experiment, to see if an old, old computer could handle a new distro. It worked, but there was space for improvement. If I had been willing to put a little more time and effort into I probably could have come up with something “keepable.” 😀

  25. houstonbofh

    Very impressive collection. I would also be interested in tweaks to apply to a running system. (What does dir_index actually do? I can’t figure out the real benefit) Also, consider the network optimizations to allow for a 256 window size, as some connections will choke with 512 and actually be slower.

  26. Myst

    Hi, what actually prelinking does? It will calculate the linking to the program and then save the state, means consuming much storage?
    Though I dont know much, but expecting it from U.. let me know

  27. K.Mandla Post author

    Hi Myst. I’m going to borrow from the Gentoo Prelinking Guide, which does a fantastic job explaining, in brief, what prelinking does.

    “Most common applications make use of shared libraries. These shared libraries need to be loaded into memory at runtime and the various symbol references need to be resolved. For most small programs this dynamic linking is very quick. But for programs written in C++ and that have many library dependencies, the dynamic linking can take a fair amount of time.

    “On most systems, libraries are not changed very often and when a program is run, the operations taken to link the program are the same every time. Prelink takes advantage of this by carrying out the linking and storing it in the executable, in effect prelinking it.

    “Prelinking can cut the startup times of applications. For example, a typical KDE program’s loading time can be cut by as much as 50%. The only maintenance required is re-running prelink every time a library is upgraded for a pre-linked executable.”

    Take a look at that guide if you want more information, or you want to fine-tune your prelinking process. Cheers!

  28. Pingback: Feisty Openbox on 1Ghz Pentium III, start to finish « Motho ke motho ka botho

  29. hamamelis

    Identical UUIDs after cloning a disk: a word of warning.

    I cloned my hd to a usb drive as a backup, using Acronis TrueImage. When I do $sudo vol_id on the usb drive, I get the same UUIDs as there are on the hd.

    I’ve not worked out how to get over this one yet, but it is a problem worth knowing about. The same may occur using a partition copied from a n image file using Acronis TrueImage or gparted.

    Any ideas how to deal with this?


  30. Ice

    Hello anybody,
    first: good work!
    I have a question about the network: How can one set up networkcards as speedy as possible. i run ubuntu 6.06 on a dell latitude c600 with onboard network 100MBit but it seems that it go only for 10 MBit/s.
    On the other hand, in my office we got some brand new dell notebooks with that nasty vista; no word’s about that but network is unbelievable fast! that breaks all limits – how goes that?
    Again: thanks for your great work here.

  31. K.Mandla Post author

    hamamelis: That’s interesting. I’d never thought much about the UUIDs being transferred when the drive is ghosted. Is that the way it’s supposed to work? I was under the impression that the UUIDs were unique to each drive, but I guess that doesn’t have to be the case.

    Ice: I’ve never heard of network cards being choked by Linux unless they were Broadcom wireless cards, which were forced to run at 11b speeds because of firmware issues. I suppose it could be a similar problem. What kind of a card is it?

  32. Sindhudweep Sarkar

    Hi Ice,
    your connection is 100Mbits per second. That is roughly equal to 11.6 megabytes per second (theoretical). 8 bits = 1 byte. I hope that helps!

  33. Ice

    @K.Mandala: The network is the build-in thing from my Dell Latitide C600 Notebook. It runs under windows with 100MBit but under ubuntu it isn’t that fast. No idea how to benchmark that but copy of large files from / to my (win2003-) servers shows the lack of performance.

    @Sindhudweep Sarkar: I know very well how to calculate it.

    I don’t know how to understand the output of tcpdump: it writes as an intro something like ‘link-type EN10MB (Ethernet)’. Shouldn’t it be EN100MB or am i wrong?

  34. Ice

    I got it, some restarts later. Don’t know how, but the last big filetransfers worked very fine. The windows taskmanager on the server even showed a networkload of 66% for some time, mostly 50%. This on an 100 MBit Ethernet network.
    tcpdump allways shows the link-type EN10MB.
    Which tool would be best to test a network?
    Thanks to K.Mandla and Sindhudweep Sarkar for their help!
    Again: Very good work.

  35. Pingback: Velocizzare kubuntu…da adesso si può! « davilinux

  36. Chris


    Thanks for this great Howto and summarising all these tweaks. Did you know, that beside the “noatime”-Option, there’s also “nodiratime” and further more “nobh” for ext2/3/4-filesystems.

    “noatime” disables, that every last access time for files is stored, and “nodiratime” does that for directories, as far as I know. For non-Server or home-use-system there are, imho, no disadvantages only improvements, when using this options.

    “nobh” (also for /etc/fstab) I found in the kernel documentation, it says:
    (found in /(kernel)/Documentation/filesystems/ext3.txt)

    “bh (*) ext3 associates buffer heads to data pages to

    nobh (a) cache disk block mapping information
    (b) link pages into transaction to provide
    ordering guarantees.
    “bh” option forces use of buffer heads.
    “nobh” option tries to avoid associating buffer
    heads (supported only for “writeback” mode).

    I guess it means some improvement when using data=writeback.

    By the way, I read that ext2 is thus old much faster than ext3, because of no journal function. So maybe it’s a good idead, to make e.g. /tmp as an extra ext2-partition. (directories with non-important data)

    Also excited about ext4dev with its “extents” feature. 🙂

    One last thing I found:
    For ext3/ext4dev there’s the “commit=(seconds)” option. In default it’s 5 seconds (commit=5), you can change that to commit=100 e.g. It’s not good for unstable systems, because with a crash, you maybe have more data loss. But I thingk it improves performance. There’s also a paragragh in the ext3-Kernel-documentation.

    Thanks again for this howto! I guess you can add safely the “nodiratime” option. Have a look at the other options.

  37. K.Mandla Post author

    Hi Chris! Thanks for the tips!

    I was looking into nodiratime, and it looks like if you flag ext2/3(/4?) with noatime, you automatically get nodiratime too. I’m going by the discussion here, where the source code seems to show as much.

    From my own experimenting, my boot and access times are almost identical with noatime, and then with noatime and nodiratime. But it’s useful nonetheless.

    I’m still looking at the other two tweaks, since I don’t have an ext3 partition built right now. Thanks again! 😉

  38. Pingback: Tips untuk mengoptimalkan filesystem ext3 Linux « Happydad’s Weblog

  39. jared

    “You can pickup a little speed boast by making the the swap partition the last partition on the hard drive. This area of the hard drive has the highest read/write speed. This will likely vary from drive to drive. Best is a seperate drive for swap, last partition, and on the fastest drive.”

    Isn’t it the other way around? The disk is round so the center turns faster. You’d want swap at the begining or center of the hard disk.

  40. Pingback: Set up Ubuntu for speed « Motho ke motho ka botho

  41. Sindhudweep Sarkar

    Hi Jared!

    If the disk is constant angular velocity (ie there is no shear between the inside and outside of the disk) then all portions of the platter go through the same amount of revolutions.

    In the case of a 5400 rpm drive, every particle on the plater rotates about the axis 10800pi radians every minute.

    The linear speed varies in a constant angular drive, so ideally you’d want the swap to be on the outside so it’s real fast. You might also want to have the /boot on the outside too.

    One needs to be careful however, since sectors are indexed starting from the outside on constant angular velocity drives. Sector 0 /is/ the outside of the disk. This is different than constant linear velocity drives like cds and dvds where the first sector is actually on the inside of the disk. I hope that helps.

  42. Pingback: I think they’re all gone « Motho ke motho ka botho

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s