Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Curious hdparm results (http://www.linux-archive.org/gentoo-user/666476-curious-hdparm-results.html)

walt 05-13-2012 08:28 PM

Curious hdparm results
 
I have a usb3 docking station which is showing some behavior I don't
understand:

#hdparm -t /dev/sdc

/dev/sdc:
Timing buffered disk reads: 266 MB in 3.00 seconds = 88.59 MB/sec
Timing buffered disk reads: 268 MB in 3.01 seconds = 89.05 MB/sec
Timing buffered disk reads: 266 MB in 3.01 seconds = 88.43 MB/sec
Timing buffered disk reads: 266 MB in 3.02 seconds = 88.10 MB/sec
Timing buffered disk reads: 306 MB in 3.01 seconds = 101.72 MB/sec
Timing buffered disk reads: 266 MB in 3.00 seconds = 88.59 MB/sec
Timing buffered disk reads: 306 MB in 3.00 seconds = 101.84 MB/sec
Timing buffered disk reads: 306 MB in 3.00 seconds = 101.86 MB/sec

That's all the same disk, repeating hdparm as fast as I could. The
disk was not even mounted at the time, and no other disks were active.

Two very different but reproducible numbers, changing values at random
times. The only thing I can think of is that the disk may be doing
a SMART self-test, but for some reason the USB connection prevents
me from accessing the data so I can't test my theory.

Any other ideas?

Volker Armin Hemmann 05-13-2012 08:39 PM

Curious hdparm results
 
Am Sonntag, 13. Mai 2012, 13:28:45 schrieb walt:
> I have a usb3 docking station which is showing some behavior I don't
> understand:
>
> #hdparm -t /dev/sdc
>
> /dev/sdc:
> Timing buffered disk reads: 266 MB in 3.00 seconds = 88.59 MB/sec
> Timing buffered disk reads: 268 MB in 3.01 seconds = 89.05 MB/sec
> Timing buffered disk reads: 266 MB in 3.01 seconds = 88.43 MB/sec
> Timing buffered disk reads: 266 MB in 3.02 seconds = 88.10 MB/sec
> Timing buffered disk reads: 306 MB in 3.01 seconds = 101.72 MB/sec
> Timing buffered disk reads: 266 MB in 3.00 seconds = 88.59 MB/sec
> Timing buffered disk reads: 306 MB in 3.00 seconds = 101.84 MB/sec
> Timing buffered disk reads: 306 MB in 3.00 seconds = 101.86 MB/sec
>
> That's all the same disk, repeating hdparm as fast as I could. The
> disk was not even mounted at the time, and no other disks were active.
>
> Two very different but reproducible numbers, changing values at random
> times. The only thing I can think of is that the disk may be doing
> a SMART self-test, but for some reason the USB connection prevents
> me from accessing the data so I can't test my theory.
>
> Any other ideas?

it is usb... don't loose any sweat about it. The numbers are fine and variation
is to be expected.

--
#163933

Michael Mol 05-13-2012 09:00 PM

Curious hdparm results
 
On Sun, May 13, 2012 at 4:28 PM, walt <w41ter@gmail.com> wrote:
> I have a usb3 docking station which is showing some behavior I don't
> understand:
>
> *#hdparm -t /dev/sdc
>
> /dev/sdc:
> *Timing buffered disk reads: 266 MB in *3.00 seconds = *88.59 MB/sec
> *Timing buffered disk reads: 268 MB in *3.01 seconds = *89.05 MB/sec
> *Timing buffered disk reads: 266 MB in *3.01 seconds = *88.43 MB/sec
> *Timing buffered disk reads: 266 MB in *3.02 seconds = *88.10 MB/sec
> *Timing buffered disk reads: 306 MB in *3.01 seconds = 101.72 MB/sec
> *Timing buffered disk reads: 266 MB in *3.00 seconds = *88.59 MB/sec
> *Timing buffered disk reads: 306 MB in *3.00 seconds = 101.84 MB/sec
> *Timing buffered disk reads: 306 MB in *3.00 seconds = 101.86 MB/sec
>
> That's all the same disk, repeating hdparm as fast as I could. *The
> disk was not even mounted at the time, and no other disks were active.
>
> Two very different but reproducible numbers, changing values at random
> times. *The only thing I can think of is that the disk may be doing
> a SMART self-test, but for some reason the USB connection prevents
> me from accessing the data so I can't test my theory.
>
> Any other ideas?

bonnie++?

My first guess is that something on the same USB bus might be
periodically active, changing how the kernel manages talking to USB
devices. Try ensuring no other USB devices are connected (or active),
and running something like "hdparm -t /dev/sdc; hdparm -t /dev/sdc;
hdparm -t /dev/sdc; hdparm -t /dev/sdc; hdparm -t /dev/sdc; hdparm -t
/dev/sdc" ...letting the shell automate it for you.

My second guess would be something relating to the kernel's page
cache...but I'm unsure if a filesystem needs to be mounted first.

My third guess would be some internal buffering behavior inside the
USB disk, and hdparm's behavior happens to straddle an edge condition.




--
:wq

walt 05-14-2012 02:52 PM

Curious hdparm results
 
On 05/13/2012 02:00 PM, Michael Mol wrote:
> On Sun, May 13, 2012 at 4:28 PM, walt <w41ter@gmail.com> wrote:
>> > I have a usb3 docking station which is showing some behavior I don't
>> > understand:
>> >
>> > #hdparm -t /dev/sdc
>> >
>> > /dev/sdc:
>> > Timing buffered disk reads: 266 MB in 3.01 seconds = 88.43 MB/sec
>> > Timing buffered disk reads: 266 MB in 3.02 seconds = 88.10 MB/sec
>> > Timing buffered disk reads: 306 MB in 3.01 seconds = 101.72 MB/sec
>> > Timing buffered disk reads: 266 MB in 3.00 seconds = 88.59 MB/sec
>> > Timing buffered disk reads: 306 MB in 3.00 seconds = 101.84 MB/sec
>> > Timing buffered disk reads: 306 MB in 3.00 seconds = 101.86 MB/sec
>> >
>> > That's all the same disk, repeating hdparm as fast as I could. The
>> > disk was not even mounted at the time, and no other disks were active.
>> >
>> > Two very different but reproducible numbers, changing values at random
>> > times. The only thing I can think of is that the disk may be doing
>> > a SMART self-test, but for some reason the USB connection prevents
>> > me from accessing the data so I can't test my theory.
>> >
>> > Any other ideas?

> bonnie++?

As Volker suggested, I'm not worried about this but I'm always up for
learning new stuff, so I tried bonnie++ on the machine's main hard
drive and on the outboard docking station (both Western Digital).

Here is bonnie's printout for each drive. Can you tell which is which?
(They must have hired a special consultant to design the format ;)

Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
a6 7G 403 97 77669 10 36911 7 2820 83 104831 11 225.0 4
Latency 38221us 1376ms 681ms 68894us 160ms 965ms
Version 1.96 ------Sequential Create------ --------Random Create--------
a6 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 17246 25 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Latency 2363us 563us 653us 157us 10us 238us
1.96,1.96,a6,1,1337025021,7G,,403,97,77669,10,3691 1,7,2820,83,104831,11,225.0,4,16,,,,,17246,25,++++ +,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,3822 1us,1376ms,681ms,68894us,160ms,965ms,2363us,563us, 653us,157us,10us,238us



Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
a6 7G 714 99 92174 11 24808 4 3938 96 112295 14 128.1 3
Latency 11493us 1582ms 233ms 25883us 22036us 5344ms
Version 1.96 ------Sequential Create------ --------Random Create--------
a6 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Latency 2515us 517us 2818us 1271us 18us 293us
1.96,1.96,a6,1,1337028303,7G,,714,99,92174,11,2480 8,4,3938,96,112295,14,128.1,3,16,,,,,+++++,+++,+++ ++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,114 93us,1582ms,233ms,25883us,22036us,5344ms,2515us,51 7us,2818us,1271us,18us,293us

Michael Mol 05-14-2012 03:22 PM

Curious hdparm results
 
On Mon, May 14, 2012 at 10:52 AM, walt <w41ter@gmail.com> wrote:
> On 05/13/2012 02:00 PM, Michael Mol wrote:
>> On Sun, May 13, 2012 at 4:28 PM, walt <w41ter@gmail.com> wrote:
>>> > I have a usb3 docking station which is showing some behavior I don't
>>> > understand:
>>> >
>>> > *#hdparm -t /dev/sdc
>>> >
>>> > /dev/sdc:
>>> > *Timing buffered disk reads: 266 MB in *3.01 seconds = *88.43 MB/sec
>>> > *Timing buffered disk reads: 266 MB in *3.02 seconds = *88.10 MB/sec
>>> > *Timing buffered disk reads: 306 MB in *3.01 seconds = 101.72 MB/sec
>>> > *Timing buffered disk reads: 266 MB in *3.00 seconds = *88.59 MB/sec
>>> > *Timing buffered disk reads: 306 MB in *3.00 seconds = 101.84 MB/sec
>>> > *Timing buffered disk reads: 306 MB in *3.00 seconds = 101.86 MB/sec
>>> >
>>> > That's all the same disk, repeating hdparm as fast as I could. *The
>>> > disk was not even mounted at the time, and no other disks were active.
>>> >
>>> > Two very different but reproducible numbers, changing values at random
>>> > times. *The only thing I can think of is that the disk may be doing
>>> > a SMART self-test, but for some reason the USB connection prevents
>>> > me from accessing the data so I can't test my theory.
>>> >
>>> > Any other ideas?
>
>> bonnie++?
>
> As Volker suggested, I'm not worried about this but I'm always up for
> learning new stuff, so I tried bonnie++ on the machine's main hard
> drive and on the outboard docking station (both Western Digital).
>
> Here is bonnie's printout for each drive. *Can you tell which is which?
> (They must have hired a special consultant to design the format ;)

Yeah, Bonnie++'s output format is a PITA in some environments. It's
just a table, but it's almost unreadable with variable-width type, and
it's worse when it wraps. I had to copy it into a text editor to be
able to read it.

>
> Version *1.96 * * * ------Sequential Output------ --Sequential Input- --Random-
> Concurrency * 1 * * -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
> Machine * * * *Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP */sec %CP
> a6 * * * * * * * 7G * 403 *97 77669 *10 36911 * 7 *2820 *83 104831 *11 225.0 * 4
> Latency * * * * * * 38221us * *1376ms * * 681ms * 68894us * * 160ms * * 965ms
> Version *1.96 * * * ------Sequential Create------ --------Random Create--------
> a6 * * * * * * * * *-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
> * * * * * * *files */sec %CP */sec %CP */sec %CP */sec %CP */sec %CP */sec %CP
> * * * * * * * * 16 17246 *25 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
> Latency * * * * * * *2363us * * 563us * * 653us * * 157us * * *10us * * 238us
> 1.96,1.96,a6,1,1337025021,7G,,403,97,77669,10,3691 1,7,2820,83,104831,11,225.0,4,16,,,,,17246,25,++++ +,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,3822 1us,1376ms,681ms,68894us,160ms,965ms,2363us,563us, 653us,157us,10us,238us
>
>
>
> Version *1.96 * * * ------Sequential Output------ --Sequential Input- --Random-
> Concurrency * 1 * * -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
> Machine * * * *Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP */sec %CP
> a6 * * * * * * * 7G * 714 *99 92174 *11 24808 * 4 *3938 *96 112295 *14 128.1 * 3
> Latency * * * * * * 11493us * *1582ms * * 233ms * 25883us * 22036us * *5344ms
> Version *1.96 * * * ------Sequential Create------ --------Random Create--------
> a6 * * * * * * * * *-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
> * * * * * * *files */sec %CP */sec %CP */sec %CP */sec %CP */sec %CP */sec %CP
> * * * * * * * * 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
> Latency * * * * * * *2515us * * 517us * *2818us * *1271us * * *18us * * 293us
> 1.96,1.96,a6,1,1337028303,7G,,714,99,92174,11,2480 8,4,3938,96,112295,14,128.1,3,16,,,,,+++++,+++,+++ ++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,114 93us,1582ms,233ms,25883us,22036us,5344ms,2515us,51 7us,2818us,1271us,18us,293us

I'd guess the second printout is the USB drive. It has a much higher
latency on the sequential input test. But that's the only big
difference I can spot.

And I'd disagree with Volker on the "It's USB..." assessment. USB3 is
a _very_ different animal from earlier versions. You get nice things
like DMA, and your CPU usage is far lower than USB2, since the CPU
doesn't have to poll the USB controller for status updates. Honestly,
I'm very impressed at how similar those two printouts look, stat wise.
It's a close call to be able to identify which is which, and I'm not
really confident I did.

--
:wq


All times are GMT. The time now is 12:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.