Ubuntu's performance : how to speed up ?

Alec Berryman alec at thened.net
Tue Feb 15 15:55:04 UTC 2005


Vincent Trouilliez on 2005-02-15 10:17:05 +0100:

> I was wondering how I could speed up Ubuntu.
> 
> A friend who has a dual CPU motherboard told me all the benefits of
> using two CPUs with Linux. Basically, Linux being such a huge
> collection/stack/pile of daemons, services, processes etc, especially
> Gnome, executing two of them at the same time really speed things up !
> So, I am sold, my next board will be a dual CPU one.

From some of your other comments in this thread, I don't think you'll
notice a performance gain by using dual processors.  SMP is useful
when you want to speed up multiple tasks; it sounds like you just want
your applications to start up faster.  gedit and gnome-terminal are
not going to start up noticably faster with multiple processors unless
you have something computationally expensive already running.

> Now, seeing as hard disk performance seems to greatly affect Gnome's
> performance, and seeing that my 40GB drive is a few years old already, I
> am wondering how much faster modern drives are. Drives being cheap, that
> could be a simple way to speed up Ubuntu a bit, until I can afford an
> expensive motherboard.

I assume you're using Parallel ATA drives and that your 40GB drive is
a 7200 RPM one.

You will probably see some increase in disk performance with a newer
drive as long as the newer drive has a signifigantly larger cache -
the last time I purchased a PATA drive I chose one with an 8MB cache.
The actual speed with which the data is transferred doesn't increase,
but it 'feels' faster over repeated disk operations.

An option is to look at Serial ATA drives.  This will probably require
a new motherboard.  The amount of data that can be transferred to and
from the drive is dramatically greater than PATA's, and you will also
be able to find 10k RPM SATA drives.

I have heard very good things about the speed of 10K RPM SATA drives,
but you should be aware that they are inherently less reliable than
7200 RPM drives - they spin faster and wear out more quickly.  By
contrast, while I do find that I notice a slight decrease in speed
from 7200 RPM to 5400 RPM, I have a 5400 RPM drive that has lasted an
incredibly long time even under constant use - this one must be 6
years old at least.

I doubt you want to invest in SCSI.  SCSI is much more expensive and
you will not notice a difference between SCSI and SATA drives of
comprable RPMs.

> I tested my drive transfer rate with hdparm : "sudo hdparm -t /dev/hda"
> I ran it 3 times, and it's about between 15 and 20MB per second.

I assume you have DMA enabled?

> Last thing, seeing as RAM is cheap, and modern boards can carry huge
> amounts of RAM, and seeing as my  /usr folder weigth "only" 2.0GB of
> data, would it be possible to put say 4GB of RAM on the board, use 2GB
> as norma system RAM, and the other 2GB of RAM to pre-load the
> entire /usr forlder at boot ?
> Is there a mechanism in Linux (Kernel ? or higher-level stuff ?) that
> would allow preloading some data into RAM at boot ?
> 
> I have "only" 512B of RAM right now, but it could be enough to
> experiment anyway. Since Ubuntu runs fine with 256MB of RAM, I could sue
> the other 256MB to load a small part of /usr, say OpenOffice.org for
> example, as it's so slow to load from the disk.

Linux will use the memory you have to the fullest - for example, if
you run `free -m` you will see a line '-/+ buffers/cache' - that's old
application memory or disk contents that have already been used and
are stored in memory for quick recall.  You certainly can put /home or
/usr in a tmpfs partition, but I don't think you'd see the performance
gains you expect.  Additionally, you'll have to wait on each boot for
the contents of that partition to be loaded from disk.

If you add memory it will be used eventually, but there's a point at
which more isn't going to matter.   I would look at the output of
`free -m` and `top` to determine where most of your memory is going -
if you're not touching swap and more than half of your memory is taken
up by buffers and cache, you probably don't need more.  (half is made
up off the top of my head).

From another one of your posts you sounded more concerned with startup
time of frequently-used applications.  Instead of upgrading your
hardware, perhaps it would be more benefical to examine how you use
the applications.  For example, it does take time to load
gnome-terminal or gedit, but once it's open you don't need to close it
- use tabs!  Look at the OpenOffice.org quickstart tray applet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050215/2a9d938f/attachment.sig>


More information about the ubuntu-users mailing list