Test Hard Drive performance?
I had a heck of a time trying to install SuSE 9.3 on my laptop... because suse would refuse to detect/recognize my main hard drive... and eventually someone suggested I try installing with: insmod=ide-generic ... which worked like a charm..
However, I have suspected that because of this 'generic' IDE driver I might not be getting the best performance out of my SuSE install... is there a way of testing the read/write speeds of the hard drive in comparison to what it should be?
Should I even be worrying about this? It just doesn't seem to be performing to the level I'm used to in windows...
Any help/suggestions would be greatly appreciated!
Thanks in advance,
no promises that this won't blow your hard drive up, but I run
#/sbin/hdparm -u 1 -d 1 /dev/hda
in one of my init.d scripts to turn on dma and irq.
you can test the speed of your drive on a direct read with /sbin/hdparm -t /dev/hdx (where x is the drive, usually a if it's the master on the primary IDE)
I wouldn't fret about using a generic IDE driver. the reason IDE is a standard is to avoid having a driver for each different model. If your drive wasn't fully compatible with a generic IDE driver, you wouldn't have been able to force an IDE plug into it.
Is there a way to check to see if DMA and IRQ are already enabled?
You can see DMA status in the 'using_dma' line
hdparm -i /dev/hda
More detailed information including an indication of the particular DMA mode in use (highlighted with *) if DMA is enabled.
IRQ list. Typically the primary IDE controller uses 14 and a secondary controller uses 15. Each IDE controller requires an IRQ to function. No IRQ, no drive access. hubcapboy did not 'turn on irq' with that command.
This is the output from the command hdparm -i /dev/hda
Async DMA: MultiWord DMA-2
Ultra DMA: Ultra DMA-5
Does this mean I'm not getting the best performance out of my hard drive? how can I make sure linux takes advantage of UDMA5?
Since that drive has a maximum media transfer rate of 50.2 MB/sec (for the two platter model) or 45.5 MB/sec (for the single platter), you may be limited by udma2 33 MB/sec operation although in the real world I'd be surprised if you notice any improvement using udma5.
Run a benchmark to establish your udma2 transfer rates
hdparm -t /dev/hda
Try setting udma5 mode (WARNING: MAY CAUSE DATA CORRUPTION - HAVE A BACKUP OR BE PREPARED TO REINSTALL)
hdparm -d1 -X udma5 /dev/hda
If no error, run another benchmark to check the difference.
hdparm -t /dev/hda
Also possibly worth trying is the hdparm -u 1 switch which sets the interrupt-unmask flag.
-u Get/set interrupt-unmask flag for the drive. A setting of 1
permits the driver to unmask other interrupts during processing
of a disk interrupt, which greatly improves Linux's responsive-
ness and eliminates "serial port overrun" errors. Use this fea-
ture with caution: some drive/controller combinations do not
tolerate the increased I/O latencies possible when this feature
is enabled, resulting in massive filesystem corruption. In par-
ticular, CMD-640B and RZ1000 (E)IDE interfaces can be unreliable
(due to a hardware flaw) when this option is used with kernel
versions earlier than 2.0.13. Disabling the IDE prefetch fea-
ture of these interfaces (usually a BIOS/CMOS setting) provides
a safe fix for the problem for use with earlier kernels.
Thank you very much for your help :)
I was able to successfully change to UDMA mode 5 without any errors and test the hard drive.. and you were right, there really isn't any difference in transfer speed :)
Now if linux defaulted to UDMA2, would it be safer to use UDMA2 if UDMA5 did not appear to offer any increase transfer speed?
I think it may be your BIOS that defaulted to udma2. If it runs udma5 in Windows, it may be a Windows driver bumping it to udma5 during boot.
I doubt you'll have any problems running udma5 in Linux. You could append the hdparm command to /etc/rc.d/rc.local to switch it during boot.
5400 rpm drives are never particularly fast though. You might consider fitting a 7200 rpm drive although it will use more power and probably run hotter and noisier. The Hitachi Travelstar 7K100 60GB (for instance) has a maximum media transfer rate of 70.1 MB/sec if your laptop has an ATA-66 or ATA-100 controller to handle the pace.
(Edit: Since udma2, 4, and 5, are ATA-33, ATA-66, and ATA-100, respectively, your laptop does indeed have an ATA-100 controller.)
|All times are GMT -5. The time now is 01:57 AM.|