Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Is my RAID performance bad possibly due to starting sector value?
Date: Sat, 29 Jun 2013 05:41:16
Message-Id: pan$4911c$c1c894e3$dc074402$4ffc9255@cox.net
In Reply to: Re: [gentoo-amd64] Re: Is my RAID performance bad possibly due to starting sector value? by "Gary E. Miller"
1 Gary E. Miller posted on Fri, 28 Jun 2013 10:50:08 -0700 as excerpted:
2
3 > Yo Duncan!
4
5 Nice greeting, BTW. Good to cheer a reader up after a long day with
6 things not going right, especially after seeing it several times in a row
7 so there's a bit of familiarity now. =:^)
8
9 > On Fri, 28 Jun 2013 09:12:24 +0000 (UTC)
10 > Duncan <1i5t5.duncan@×××.net> wrote:
11 >
12 >> Duncan posted on Fri, 28 Jun 2013 03:36:10 +0000 as excerpted:
13 >>
14 >> I settled on a 4 GiB file. Speeds are power-of-10-based since that's
15 >> what dd reports, unless otherwise stated.
16 >
17 > dd is pretty good at testing linear file performance, pretty useless for
18 > testing mysql performance.
19
20 Recognized. A single i/o job test, but it's something, it's reasonably
21 repeatable, and when done on the actual filesystem, it's real-world times
22 and flexible in data and block size, if single-job limited.
23
24 Plus, unlike some of the more exotic tests which need to be installed
25 separately, it's commonly already installed and available for use on most
26 *ix systems. =:^)
27
28 >> To SSD: peak was upper 250s MB/s over a wide blocksize range of 1 MiB
29 >> >From SSD: peak was lower 480s MB/s, blocksize 32 KiB to 512 KiB
30 >
31 > Sounds about right. Your speeds are now so high that small differences
32 > in the SATA controller chip will be bigger than that between some SSD
33 > drives. Use a PCIe/SATA card and your performance will drop from what
34 > you see.
35
36 Good point.
37
38 I was thinking about that the other day. SSDs are fast enough that they
39 saturate a modern PCIe 3.0 1x and a single SATA-600 channel all by
40 themselves. SATA port-multipliers are arguably still useful for for
41 slower spinning rust, but not so much for SSD, where the bottleneck is
42 often already the SATA and/or PCIe, so doubling up will indeed only slow
43 things down.
44
45 And most add-on SATA cards have several SATA ports hanging off the same
46 1x PCIe, which means they'll bottleneck if actually using more than a
47 single port, too.
48
49 I believe I have seen 4x PCIe SATA cards, which would allow four or so
50 SATA ports (I think 5), but they tend to be higher priced.
51
52 After pondering that for a bit, I decided I'd take a closer look next
53 time I was at Fry's Electronics, to see what was actually available, as
54 well as the prices. Until last year I was still running old PCI-X boxes,
55 so the whole PCI-E thing itself is still relatively new to me, and I'm
56 still reorienting myself to the modern bus and its implications in terms
57 of addon cards, etc.
58
59 >> Spinning rust speeds, single Seagate st9500424as, 7200rpm 2.5" 16MB
60 >
61 > Those are pretty old and slow. If you are going to test an HDD against
62 > a newer SSD you should at least test a newer HDD. A new 2TB drive could
63 > get pretty close to your SSD performance in linear tests.
64
65 Well, it's not particularly old, but it *IS* a 2.5 inch, down from the
66 old 3.5 inch standard, which due to the smaller diameter does mean lower
67 rim/maximum speeds at the same RPM. And of course 7200 RPM is middle of
68 the pack as well. The fast stuff (tho calling any spinning rust "fast"
69 in the age of SSDs does rather jar, it's relative!) is 15000.
70
71 But 2.5 inch does seem to be on its way as the new standard for desktops
72 and servers as well, helped along by the three factors of storage
73 density, SSDs (which are invariably 2.5 inch, and even that's due to the
74 standard form factor as often the circuit boards aren't full height and/
75 or are largely empty space, 3.5 inch is just /ridiculously/ huge for
76 them), and the newer focus on power efficiency (plus raw spindle density!
77 ) in the data center.
78
79 There's still a lot of inertia behind the 3.5 inch standard, just as
80 there is behind spinning rust, and it's not going away overnight, but in
81 the larger picture, 3.5 inch tends to look as anachronous as a full size
82 desktop in an age when even the laptop is being displaced by the tablet
83 and mobile phone. Which isn't to say there's no one still using them, by
84 far (my main machine is still a mid tower, easier to switch out parts on
85 them, after all), but just sayin' what I'm sayin'.
86
87 Anyway...
88
89 >> To rust: upper 70s MB/s, blocksize didn't seem to matter much.
90 >> >From rust: upper 90s MB/s, blocksize upto 4 MiB.
91 >
92 > Seems about right, for that drive.
93 >
94 > I think your numbers are about right, if your workload is just reading
95 > and writing big linear files. For a MySQL workload there would be a lot
96 > of random reads/writes/seeks and the SSD would really shine.
97
98 Absolutely. And perhaps more to the point given the list and thus the
99 readership...
100
101 As I said in a different thread on a different list, recently, I didn't
102 see my boot times change much, the major factor there being the ntp-
103 client time-sync, at ~12 seconds usually (just long enough to trigger
104 openrc's first 10-second warning in the minute timeout...), but *WOW*,
105 did the SSDs drop my emerge sync, as well as kernel git pull, time!
106 Those are both many smaller files that will tend to highly fragment over
107 time due to constant churn, and that's EXACTLY the job type where good
108 SSDs can (and do!) really shine!
109
110 Like your MySQL db example (tho that's high activity large-file rather
111 than high-activity huge number of smaller files), except this one's
112 likely more directly useful to a larger share of the list readership. =:^)
113
114 Meanwhile, the other thing with the boot times is that I boot to a CLI
115 login, so don't tend to count the X and kde startup times as boot. But
116 kde starts up much faster too, and that would count as boot time for many
117 users.
118
119 Additionally, I have one X app, pan, that in my (not exactly design
120 targeted) usage, had a startup time that really suffered on spinning
121 rust, so much so that for years I've had it start with the kde session,
122 so that if it takes five minutes on cold-cache to startup, no big deal, I
123 have other things to do and it's ready when I'm ready for it. It's a
124 newsgroups (nntp) app, which as designed (by default) ships with a 10 MB
125 article cache, and expires headers in (IIRC) two weeks. But my usage, in
126 addition to following my various lists with it using gmane's list2news
127 service, is as a long-time technical group and list archive. My text-
128 instance pan (the one I use the most) has a cache size of several gig
129 (with about a gig actually used) and is set to no-expiry on messages. In
130 fact, I have ISP newsgroups archived in pan for an ISP server that hasn't
131 hasn't even existed for several years, now, as well as the archives for
132 several mailing lists going back over a decade to 2002.
133
134 So this text-instance pan tends to be another prime example of best-use-
135 case-for-SSDs. Thousands, actually tens of thousands of files I believe,
136 all in the same cache dir, with pan accessing them all to rebuild its
137 threading tree in memory at startup. (For years there's been talk of
138 switching that to a database, so it doesn't have to all be in memory at
139 once, but the implementation has yet to be coded up and switched to.) On
140 spinning rust, I did note a good speed boost if I backed up everything
141 and did a mkfs and restore from time to time, so it's definitely a high
142 fragmentation use-case as well. *GREAT* use case for SSD, and there too,
143 I noticed a HUGE difference. Tho I've not actually timed the startup
144 since switching to SSD, I do know that the pan icon appears in the system
145 tray far earlier than it did, such that I almost think it's there as soon
146 as the system tray is, now, whereas on the spinning rust, it would take
147 five minutes or more to appear.
148
149 ... Which is something those dd results don't, and can't, show at all.
150 Single i/o thread access to a single rather large (GBs) unchanged since
151 original write file is one thing. Access to thousands or tens of
152 thousands of constantly changing or multi-write-thread interwoven little
153 files, or for that matter, to a high activity large file thus (depending
154 on the filesystem) potentially triggering COW fragmentation there, is
155 something entirely different.
156
157 And the many-parallel-job seek latency of spinning rust is something that
158 dd simply does not and cannot really measure, as it's simply the wrong
159 tool for that sort of purpose.
160
161 --
162 Duncan - List replies preferred. No HTML msgs.
163 "Every nonfree program has a lord, a master --
164 and if you use the program, he is your master." Richard Stallman