Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [OT] Curious hdparm results
Date: Mon, 14 May 2012 15:24:04
Message-Id: CA+czFiB0_jGz6Q+a3UHhpmHwJ_eFgS1vvk0r+NT-R5PeD1mDkA@mail.gmail.com
In Reply to: [gentoo-user] Re: [OT] Curious hdparm results by walt
1 On Mon, May 14, 2012 at 10:52 AM, walt <w41ter@×××××.com> wrote:
2 > On 05/13/2012 02:00 PM, Michael Mol wrote:
3 >> On Sun, May 13, 2012 at 4:28 PM, walt <w41ter@×××××.com> wrote:
4 >>> > I have a usb3 docking station which is showing some behavior I don't
5 >>> > understand:
6 >>> >
7 >>> >  #hdparm -t /dev/sdc
8 >>> >
9 >>> > /dev/sdc:
10 >>> >  Timing buffered disk reads: 266 MB in  3.01 seconds =  88.43 MB/sec
11 >>> >  Timing buffered disk reads: 266 MB in  3.02 seconds =  88.10 MB/sec
12 >>> >  Timing buffered disk reads: 306 MB in  3.01 seconds = 101.72 MB/sec
13 >>> >  Timing buffered disk reads: 266 MB in  3.00 seconds =  88.59 MB/sec
14 >>> >  Timing buffered disk reads: 306 MB in  3.00 seconds = 101.84 MB/sec
15 >>> >  Timing buffered disk reads: 306 MB in  3.00 seconds = 101.86 MB/sec
16 >>> >
17 >>> > That's all the same disk, repeating hdparm as fast as I could.  The
18 >>> > disk was not even mounted at the time, and no other disks were active.
19 >>> >
20 >>> > Two very different but reproducible numbers, changing values at random
21 >>> > times.  The only thing I can think of is that the disk may be doing
22 >>> > a SMART self-test, but for some reason the USB connection prevents
23 >>> > me from accessing the data so I can't test my theory.
24 >>> >
25 >>> > Any other ideas?
26 >
27 >> bonnie++?
28 >
29 > As Volker suggested, I'm not worried about this but I'm always up for
30 > learning new stuff, so I tried bonnie++ on the machine's main hard
31 > drive and on the outboard docking station (both Western Digital).
32 >
33 > Here is bonnie's printout for each drive.  Can you tell which is which?
34 > (They must have hired a special consultant to design the format ;)
35
36 Yeah, Bonnie++'s output format is a PITA in some environments. It's
37 just a table, but it's almost unreadable with variable-width type, and
38 it's worse when it wraps. I had to copy it into a text editor to be
39 able to read it.
40
41 >
42 > Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
43 > Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
44 > Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
45 > a6               7G   403  97 77669  10 36911   7  2820  83 104831  11 225.0   4
46 > Latency             38221us    1376ms     681ms   68894us     160ms     965ms
47 > Version  1.96       ------Sequential Create------ --------Random Create--------
48 > a6                  -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
49 >              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
50 >                 16 17246  25 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
51 > Latency              2363us     563us     653us     157us      10us     238us
52 > 1.96,1.96,a6,1,1337025021,7G,,403,97,77669,10,36911,7,2820,83,104831,11,225.0,4,16,,,,,17246,25,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,38221us,1376ms,681ms,68894us,160ms,965ms,2363us,563us,653us,157us,10us,238us
53 >
54 >
55 >
56 > Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
57 > Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
58 > Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
59 > a6               7G   714  99 92174  11 24808   4  3938  96 112295  14 128.1   3
60 > Latency             11493us    1582ms     233ms   25883us   22036us    5344ms
61 > Version  1.96       ------Sequential Create------ --------Random Create--------
62 > a6                  -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
63 >              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
64 >                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
65 > Latency              2515us     517us    2818us    1271us      18us     293us
66 > 1.96,1.96,a6,1,1337028303,7G,,714,99,92174,11,24808,4,3938,96,112295,14,128.1,3,16,,,,,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,11493us,1582ms,233ms,25883us,22036us,5344ms,2515us,517us,2818us,1271us,18us,293us
67
68 I'd guess the second printout is the USB drive. It has a much higher
69 latency on the sequential input test. But that's the only big
70 difference I can spot.
71
72 And I'd disagree with Volker on the "It's USB..." assessment. USB3 is
73 a _very_ different animal from earlier versions. You get nice things
74 like DMA, and your CPU usage is far lower than USB2, since the CPU
75 doesn't have to poll the USB controller for status updates. Honestly,
76 I'm very impressed at how similar those two printouts look, stat wise.
77 It's a close call to be able to identify which is which, and I'm not
78 really confident I did.
79
80 --
81 :wq