Hello all,

For beginners who want to optimize their toys:

This is by no means complete. Use your own judgment: Not all hints
given here work necessary well when used together.

1. Hardware

a. Make sure the hardware is optimized first.
   One of the simplest tests is on the harddrives, e.g.:

        hdparm -Tt /dev/hda

   will return something like (on a average new IDE disk):

       /dev/hda:
        Timing buffer-cache reads:   128 MB in  0.52 seconds =245.47 MB/sec
        Timing buffered disk reads:  64 MB in  1.59 seconds = 40.30 MB/sec

   even on a 2 years old HD I get:

       /dev/hda:
        Timing buffer-cache reads:   128 MB in  0.91 seconds =141.24 MB/sec
        Timing buffered disk reads:  64 MB in  1.96 seconds = 32.67 MB/sec

   Notes: RedHat 8.0 has disabled DMA on CD-ROM/DVD's, see the REASE-NOTES
          It is most likely that you are OK with DVD's (with CD-ROM's you have
          to check). To reenable it first insert 'options ide-cd dma=1'
          into /etc/modules.conf. Then use hdparm or /etc/sysconfig/harddisks

b. It is advisable that you have (put) the CD/DVD and HD on different IDE
   interfaces if possible (sadly not always: my Inspiron 8k have the HD and
   CD-RW on the same IDE).

2. System configuration:

a. Critical, heavily used, CPU intensive subsystems should be optimized for
   the CPU you have. The most basic ones are the kernel and glibc (the C lib).
   Other good targets for optimization are the multimedia apps.
   If you are a number crunching junkie consider ATLAS, gsl, octave or
   whatever you use: in a very unscientific test I've got a 8x (eight times)
   speed increase with a Scilab linked with a ATLAS lapack vs. a Scilab linked
   with the plain lapack.

   Hint: compiling "ls" optimized for a Pentium 4 is unlikely to speed your
         system significantly. Think of the 80/20 rule.

   In RedHat you have optimized kernels and glibc for 686 and athlons.
   It should be automatically installed, you can check with:
   rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n' <package-name>

b. Consider swap only as an insurance against "Out of memory" errors.
   However if you have multiple HD's then you can spread the swap across:
   create one swap partition on each and then declare them with the same
   priority in the /etc/fstab. The kernel then will do a round-robin on them.

   Hint: again, use your own judgment: if one of the HD's is much faster
         than the other then what ? If you are using heavily one of the
         drives for data I/O then what ?

c. Consider a RAID. I don't have experience with software RAID but even that
   one should be better than a "plain" access. OTOH it increases significantly
   the hardware crash risks (hint: backups)

   Hint: again use your own head: if you spread both swap and the RAID
         over the same drives then what ?

d. Consider prelinking. Linkage under Linux is slow (don't know if this is a
   misfeature or what). This leads to a long start-up time for programs who
   link toward many libs. The classical example is OpenOffice.

   In RedHat 8.0 you can setup prelinking easily. See the RELEASE-NOTES
   for details. In other distors it should be quite the same.


Cheers,
-- 
Ryurick M. Hristev mailto:[EMAIL PROTECTED]
Computer Systems Manager
University of Canterbury, Physics & Astronomy Dept., New Zealand

Reply via email to