LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 09-04-2005, 08:18 PM   #1
voxel
Member
 
Registered: Aug 2005
Location: Canada
Distribution: SuSE 9.3
Posts: 34

Rep: Reputation: 15
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,
 
Old 09-04-2005, 08:30 PM   #2
hubcapboy
LQ Newbie
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 23

Rep: Reputation: 15
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.

/g
 
Old 09-06-2005, 01:35 AM   #3
voxel
Member
 
Registered: Aug 2005
Location: Canada
Distribution: SuSE 9.3
Posts: 34

Original Poster
Rep: Reputation: 15
Is there a way to check to see if DMA and IRQ are already enabled?
 
Old 09-06-2005, 03:04 AM   #4
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
hdparm /dev/hda
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.

cat /proc/interrupts
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.
 
Old 09-06-2005, 12:01 PM   #5
voxel
Member
 
Registered: Aug 2005
Location: Canada
Distribution: SuSE 9.3
Posts: 34

Original Poster
Rep: Reputation: 15
This is the output from the command hdparm -i /dev/hda
Code:
Model=HITACHI_DK23FB-40, FwRev=00M1A0A1, SerialNo=19N409
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode
So it looks to be using UDMA mode 2... However, I checked my BIOS, and under the IDE configuration of Primary Master (my hard drive) it states the following about DMA:

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?
 
Old 09-06-2005, 05:03 PM   #6
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
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.
http://www.netcomdirect.com/hitrdk40at292.html

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.
 
Old 09-07-2005, 12:10 AM   #7
voxel
Member
 
Registered: Aug 2005
Location: Canada
Distribution: SuSE 9.3
Posts: 34

Original Poster
Rep: Reputation: 15
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?
 
Old 09-07-2005, 02:44 AM   #8
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
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.

http://ldp.nllgg.nl/HOWTO/Ultra-DMA-8.html#ss8.1
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.)

Last edited by Snowbat; 09-07-2005 at 02:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard drive performance jeremy Linux - General 550 03-09-2013 09:48 PM
Hard Drive Performance - Raid funbags Linux - General 3 11-13-2005 11:31 AM
Horrible Hard Drive Performance????? linux-rulz Linux - Hardware 13 06-26-2005 09:10 PM
hard drive performance true_atlantis Linux - General 3 10-26-2004 04:15 AM
hard drive performance bynaar Slackware 2 12-18-2002 07:21 AM


All times are GMT -5. The time now is 01:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration