Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Normal disk speed?
Date: Sat, 02 Oct 2010 15:06:36
Message-Id: 4CA74A5D.4040505@f_philipp.fastmail.net
In Reply to: Re: [gentoo-user] Normal disk speed? by Florian Philipp
1 Am 02.10.2010 14:44, schrieb Florian Philipp:
2 > Am 02.10.2010 14:11, schrieb Volker Armin Hemmann:
3 >> On Saturday 02 October 2010, Florian Philipp wrote:
4 > [...]
5 >>>
6 >>> Assumptions:
7 >>>
8 >>> 1. Seek time is constant. For HDDs we can take an average value. Of
9 >>> course this doesn't work for tapes. They have a seek time which
10 >>> increases linearly with the distance between the fragments.
11 >>
12 >> I think you misunderstood my remark.
13 >>
14 >> Tapes try to stream. Take an old DLT drive with 5-10mb/sec streaming speed.
15 >> Slow, isn't it?
16 >>
17 >> But when you do a backup on such an old tape even with a modern harddisk you
18 >> have problems keeping it streaming. As soon as you hit a directory with many
19 >> small files - like ~/Mail or /usr/portage you are screwed.
20 >>
21 >> Yes, you have wonderfull 100mb/sec when you read a big, fat file. Or a single
22 >> small file. But when you have houndreds, thousands or hundreds of thousands of
23 >> small files, harddisks suck.
24 >> And your tape drive has to stop and rewind every couple of seconds because
25 >> your harddisks were not able to keep up the required 10mb/sec. Trueley
26 >> pathetic.
27 >
28 > Well, that's exactly what my little math shows. When you read 4kB files,
29 > you can end up with 0.0065 * 50 MB/s = 0.32 MB/s effective throughput
30 > (worst case).
31 >
32 >>
33 >> Besides, seek times are not constant ;)
34 >>
35 >
36 > Sure they aren't. That's why it is stated as an assumption. It is just a
37 > model. Like every model it has its limits.[1] It doesn't take into
38 > account prefetching, caching and NCQ/TCQ, for example.
39 >
40 > Still it is a valid assumption: *On average*, the read/write head has to
41 > move around half the radius of the platter to reach its next position
42 > and it has to wait for half a rotation until the right block is under
43 > the head. If we assume that fragments are uniformly distributed over the
44 > whole disk, we can simply take an average value for seek times.
45 >
46 > The model also doesn't take into account that even with no
47 > fragmentation, there might be some seek operations: Blocks on an HDD are
48 > organized in rings (tracks), not as a spiral like the sound track on an
49 > good old LP. That means that at some point, the r/w head has to switch
50 > to the next track when the file does not reside on one track alone.
51 >
52 > [1] A bit off-topic: I work in applied sciences and engineering. There
53 > I've learned two basic rules about models: 1. Truth doesn't matter,
54 > usefulness does. 2. Every model has its limits. Knowing these limits is
55 > the single most important important thing when using a model.
56 >
57
58
59 Hmm, I've just looked up some specs from this page:
60 http://www.wdc.com/en/products/products.asp?driveid=512
61
62 These make me a wonder a bit:
63 Average latency is 5.5 ms. That's the time the disk needs for half a
64 rotation. However, read seek time is 12 ms. That's a bit more than one
65 rotation. If that's an average value rather than a maximum, it makes me
66 wonder what takes it so long. It can't be rotational delay (that's their
67 average latency). Therefore it must be the time it takes the r/w head to
68 move into position.
69
70 I find it a bit unbelievable that this takes so long. If that really is
71 the limiting factor then a high-end server disk couldn't be much faster
72 simply by increasing the RPM.
73
74 Well, I guess their "seek time" is the maximum value. Then it makes
75 sense: One rotation is 11.111 ms. Then they might add some latency due
76 to data processing etc. Any different thoughts?
77
78 Another interesting bit of information: Track-to-track seek time is 2
79 ms. That's the seek time I mentioned above which also occurs for
80 sequential reads/writes.
81
82 Regards,
83 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature