LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-02-2008, 08:52 AM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 485

Rep: Reputation: 31
hdparm hard drive timings. How do I find the bottleneck?


Ok this is somewhat pissing me off. I bought a super server (ok for me super) and it's hard drive speeds are ~60 MB/sec. Which I thought was fast.

My parents buy a new computer from futureshop which is slower than my server and they get almost double the speed.

Code:
[root@butterfly ~]# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   2250 MB in  2.00 seconds = 1125.65 MB/sec
 Timing buffered disk reads:  338 MB in  3.00 seconds = 112.52 MB/sec

I'm jealous. The drives on both computers are SATA so the theoretical limit is 3G/sec. How to I figure out which component is slowing me down? Is there software out there to test controller speeds? Bus speed? or whatever?
 
Old 09-02-2008, 12:19 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
There could be a lot of causes, from a cheap motherboard to a kernel problem. But you haven't really given enough information (on either machine) to determine what is really causing the issue.

I will say that 60 MBps is certainly not a very good speed for SATA. But again, it depends on the RPMs of the drive, which SATA version it is using, etc, etc. There are many variables.
 
Old 09-02-2008, 01:12 PM   #3
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 485

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by MS3FGX View Post
There could be a lot of causes, from a cheap motherboard to a kernel problem. But you haven't really given enough information (on either machine) to determine what is really causing the issue.

I will say that 60 MBps is certainly not a very good speed for SATA. But again, it depends on the RPMs of the drive, which SATA version it is using, etc, etc. There are many variables.
That's what I'm asking is what information would you need. What variables do I look at? Where do I start, and what do I use to find out?
 
Old 09-02-2008, 03:23 PM   #4
JonnerR
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Rep: Reputation: 17
What type of drives are you comparing?

Quote:
Originally Posted by MikeyCarter View Post
Ok this is somewhat pissing me off. I bought a super server (ok for me super) and it's hard drive speeds are ~60 MB/sec. Which I thought was fast.

My parents buy a new computer from futureshop which is slower than my server and they get almost double the speed.

Code:
[root@butterfly ~]# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   2250 MB in  2.00 seconds = 1125.65 MB/sec
 Timing buffered disk reads:  338 MB in  3.00 seconds = 112.52 MB/sec

I'm jealous. The drives on both computers are SATA so the theoretical limit is 3G/sec. How to I figure out which component is slowing me down? Is there software out there to test controller speeds? Bus speed? or whatever?
As far as I know, 60 Megabytes per second (MB/sec) is still an OK speed for a regular 7200 RPM ATA or SATA hard drive. I have a 10,000 RPM Western Digital Raptor SATA drive from a couple of years ago that hdparm measures at about 68 MB/sec. In comparison, several of my 7200 RPM drives get from 30 MB/sec to 60 MB/sec depending on age.

The measurement of 112.52 MB/sec seems a bit suspicious to me, since I don't think many single consumer hard drive can sustain that kind of read speed yet. It's certainly possible using two drives and striping or fast Flash memory. Some of the newest large hard drives might be capable of that too.

What models does "hdparm -i /dev/sda" show? Try running "hdparm -FtT /dev/sda" which might give more accurate results if the drive has a large built in cache and "hdparm -tF --direct /dev/sda" which can sometimes give a better measurement of the raw drive's read speed.

Be careful reading speeds in specifications, since they can use very different units. SATA can use a low level signalling rate of 1.5 Gigabits per second (1.5 Gbps) or 3 Gigabits per second (3 Gbps). Because of the way it encodes data, that translates to roughly a maximum of 150 Megabytes per second (150 MB/sec) or 300 Megabytes per second (300 MB/sec). For single drives, it rarely makes much difference yet which SATA speed you use, since few get close to 150 MB/sec.

Maximum read speed is only one measurement of performance of a hard drive. Seek times and write speeds can be just as important on a server, if not more so. Try some comparisons unpacking or creating a tarball or use a benchmark tool like bonnie++ to get more useful comparisons.
 
Old 09-02-2008, 03:40 PM   #5
kWzTa
LQ Newbie
 
Registered: Sep 2005
Distribution: Slackware
Posts: 9

Rep: Reputation: 0
You can try several simple things such as:

1) Look for suspicious messages in the output of 'dmesg' can also help.

Maybe it's a configuration problem ...

2) Switch the two disks and run the tests again.

Maybe the disk of your server is defective ...
 
Old 09-02-2008, 04:12 PM   #6
darthaxul
Member
 
Registered: Aug 2008
Distribution: Gentoo; Debian; FreeBSD
Posts: 223

Rep: Reputation: 18
my timings

I always thought sata was faster than pata but i was slapped in the face with the results of my test.
80gb sata
320gb pata
320 was getting +15-30MB faster reads/writes and cacheing.
Then I was thinking that maybe it was the drivers problem but it is impossible for me to figure that out.
 
Old 09-02-2008, 04:14 PM   #7
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 485

Original Poster
Rep: Reputation: 31
Mom's computer

Code:
[root@butterfly ~]# hdparm -i /dev/sda

/dev/sda:

 Model=WDC WD3200AAKS-75B3A0                   , FwRev=01.03A01, SerialNo=     WD-WMAT12052573
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?0?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=625142448
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

[root@butterfly ~]# hdparm -tF --direct /dev/sda

/dev/sda:
 Timing O_DIRECT disk reads:  338 MB in  3.01 seconds = 112.31 MB/sec
[root@butterfly ~]# hdparm -FtT /dev/sda

/dev/sda:
 Timing cached reads:   2252 MB in  2.00 seconds = 1125.75 MB/sec
 Timing buffered disk reads:  338 MB in  3.00 seconds = 112.49 MB/sec
My Server:

Code:
[root@firefly-dom0 log]# hdparm -i /dev/sda /dev/sdf 

/dev/sda:

 Model=Maxtor 6B200P0                          , FwRev=BAH41BY0, SerialNo=B420CBCH            
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?8?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,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 udma6 
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 0:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


/dev/sdf:

 Model=WDC WD2500KS-00MJB0                     , FwRev=02.01C03, SerialNo=     WD-WCANKE715203
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

[root@firefly-dom0 log]# hdparm -i /dev/sd[a-f]

/dev/sda:

 Model=Maxtor 6B200P0                          , FwRev=BAH41BY0, SerialNo=B420CBCH            
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?8?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,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 udma6 
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 0:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


/dev/sdb:

 Model=WDC WD1600YS-18SHB0                     , FwRev=20.06C05, SerialNo=     WD-WCAP01664534
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?8?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


/dev/sdc:

 Model=External Disk 0                         , FwRev=1.0451  , SerialNo=AL25744_12345678_0_B
 Config={ }
 RawCHS=65535/16/1863, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=1, MultSect=?1?
 CurCHS=65535/16/1863, CurSects=268435455, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 *mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-5,6,7

 * signifies the current active mode


/dev/sdd:

 Model=WDC WD2500KS-00MJB0                     , FwRev=02.01C03, SerialNo=     WD-WCANKF226123
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?8?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


/dev/sde:

 Model=WDC WD2500KS-00MJB0                     , FwRev=02.01C03, SerialNo=     WD-WCANK9181864
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


/dev/sdf:

 Model=WDC WD2500KS-00MJB0                     , FwRev=02.01C03, SerialNo=     WD-WCANKE715203
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

[root@firefly-dom0 log]# hdparm -tF --direct /dev/sd[a-f]

/dev/sda:
 Timing O_DIRECT disk reads:   90 MB in  3.02 seconds =  29.81 MB/sec

/dev/sdb:
 Timing O_DIRECT disk reads:   84 MB in  3.06 seconds =  27.45 MB/sec

/dev/sdc:
 Timing O_DIRECT disk reads:  144 MB in  3.01 seconds =  47.83 MB/sec

/dev/sdd:
 Timing O_DIRECT disk reads:  186 MB in  3.01 seconds =  61.71 MB/sec

/dev/sde:
 Timing O_DIRECT disk reads:   40 MB in  3.05 seconds =  13.10 MB/sec

/dev/sdf:
 Timing O_DIRECT disk reads:   78 MB in  3.04 seconds =  25.66 MB/sec

/dev/sdd was about 98% idle during the test. Can't shut the server down for this at the moment but when I did the tests earlier it was about 65-70 MB/sec.
 
Old 09-02-2008, 07:06 PM   #8
JonnerR
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Rep: Reputation: 17
Everything seems OK

Quote:
Code:
/dev/sdd:

 Model=WDC WD2500KS-00MJB0                     , FwRev=02.01C03, SerialNo=     WD-WCANKF226123
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?8?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

/dev/sdd:
 Timing O_DIRECT disk reads:  186 MB in  3.01 seconds =  61.71 MB/sec
So, MikeyCarter, /dev/sd{d,e,f} are the drives you're concerned about right now? As luck would have it, I have the exact same model (WDC WD2500KS-00MJB0) in one of my machines:
Code:
/dev/sda:

 Model=WDC WD2500KS-00MJB0                     , FwRev=02.01C03, SerialNo=     WD-WCANK1185514
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=488397168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

jrogers@marvin:~$ sudo hdparm -Ft --direct /dev/sda

/dev/sda:
 Timing O_DIRECT disk reads:  186 MB in  3.01 seconds =  61.89 MB/sec
jrogers@marvin:~$ sudo hdparm -FtT /dev/sda

/dev/sda:
 Timing cached reads:   1560 MB in  2.00 seconds = 779.67 MB/sec
 Timing buffered disk reads:  182 MB in  3.00 seconds =  60.60 MB/sec
I'm not sure why my hdparm output indicates it's running in udma6 mode and your /dev/sdd only goes up to udma5, but as you can see, the speed measurements are very close. As I bought the drive for a low price a couple of years ago, the speed seems quite acceptable to me. I don't think there's anything specifically wrong with your system. I've noticed that running hdparm with --direct is a lot more sensitive to other loads on the disc, so maybe "hdparm -FtT" is better after all.

http://www.storagereview.com/WD2500KS.sr?page=0%2C1 seems to corroborate a maximum sustained read speed of about 61 MB/sec for a WD2500KS. I'm pretty sure hdparm just reads from the beginning of the disc. If it read near the end, you'd see much lower speeds. That's one reason to look at more than just hdparm's speed test for an overall comparison.

I'm quite surprised the WD3200AAKS in "Mom's computer" performed so well. The speed you measured is only a bit more than shown here: http://www.anandtech.com/storage/showdoc.aspx?i=3236. I guess the perpendicular magnetic recording (http://en.wikipedia.org/wiki/Perpend...etic_recording) has improved read performance a lot more than I had realized. It seems that inexpensive 7200 RPM drives now outperform my 10,000 RPM Raptor in sequential read, if not seek time.

So, in conclusion, I'll say again that I don't think there's anything wrong with your server, as the drive seems to be performing as expected. If you want better sequential read speeds, you'll probably have to get a newer drive with PMR or use striping over your three WD2500KSs. However, test the actual performance in tasks similar to how you use it before spending any money, as sequential read speed is not always the most important factor.
 
Old 09-03-2008, 01:45 AM   #9
stanlo45
LQ Newbie
 
Registered: Jul 2008
Location: JHB, South Africa
Distribution: Suse
Posts: 4
Blog Entries: 1

Rep: Reputation: 0
Hi Mikey,

Have you checked if there is any jumper setting on the hard drive limiting it to 1.5 Gbps?
 
Old 09-03-2008, 08:21 AM   #10
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 485

Original Poster
Rep: Reputation: 31
http://www.anandtech.com/storage/showdoc.aspx?i=3236

Pretty much explains it. So my drives are the bottleneck. The drive in my mom's computer is just that much faster.

This gives me the starting point I needed.

Thanks for the help.
 
  


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
hdparm / APM / Hard Drive Clicking Sound win32sux Ubuntu 6 01-15-2009 06:22 AM
LXer: Linux hard drive benchmark & bottleneck testing LXer Syndicated Linux News 0 01-07-2007 07:03 PM
silencing hard drive with hdparm cunitt Slackware 7 09-13-2006 03:15 PM
Cannot Find Hard Drive mathewjn Linux - Hardware 2 08-30-2005 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:10 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
Open Source Consulting | Domain Registration