Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: phranque
You can tweak Apache, optimize your php et al, but the bottom line is your hardware. I found that my disks were running at a slow, safe speed, which is stupid. It's like driving your car with the handbrake on, cos thats safer.
I've collated what I've found from other places and here's the answer - how to make your disks run 2x 4x 8x faster.
You nay have a 100Mb EIDE bus, you may have disks with transfer speeds of 20-30 or 40MB/s. But if you have taken the default safe install, your'e disks are running like slugs. You need to issue a few commands to tune it up.
First: disclaimer. Do the following at your own risk. Take backups before changes.
log in as root and type:
hdparm -Tt /dev/hda
You should see stuff like:
Timing buffer-cache reads: 128 MB in 1.40 seconds =100.43 MB/sec
Timing buffered disk reads: 64 MB in 14.32 seconds = 4.77 MB/sec
This means that your disk is running at 100MB/sec from its cache, but only 4.77 MB/s from its internal gubbins. So much for yer IBM 33 MB/s transfer rate eh?
this shows stuff like:
multcount = 0 (off)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 2866/255/63, sectors = 40043440, start = 0
This means that yer disks are crap. They are running in 16 bit mode and stuff. They are definately running with the handbrake on and the trunk full of lead.
Type this to speed up:
hdparm -c3 -m16 /dev/hda
now do a
hdparm -Tt /dev/hda
and you'll see at least an instant doubling of the transfer rate.
let's try out some superwhizzo settings:
hdparm -X34 -d1 -u1 /dev/hda
Now run the benchmark and see how much speed ya got now.
There is more hard drive tuning than just hdparm. For example, the choice of the file system can be important too, like using XFS for high throughput download stuff and ReiserFS for lots of small files in a directory...
Even when the DMA mode is automatically set, you would like to check the I/O mode to be set at 32bit; my system has DMA on automatically, but the I/O mode stays at 0 (16bit).