kernel - Fix SMP race in procfs
[dragonfly.git] / share / doc / papers / diskperf / results.ms
1 .\" Copyright (c) 1983 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)results.ms  6.2 (Berkeley) 4/16/91
29 .\"
30 .ds RH Results
31 .NH
32 Results
33 .PP
34 The following tables indicate the results of our
35 test runs.
36 Note that each table contains results for tests run
37 on two varieties of 4.2BSD file systems.
38 The first set of results is always for a file system
39 with a basic blocking factor of eight Kilobytes and a
40 fragment size of 1 Kilobyte. The second sets of measurements
41 are for file systems with a four Kilobyte block size and a
42 one Kilobyte fragment size.
43 The values in parenthesis indicate the percentage of CPU
44 time used by the test program.
45 In the case of the two disk arm tests, 
46 the value in parenthesis indicates the sum of the percentage
47 of the test programs that were run.
48 Entries of ``n. m.'' indicate this value was not measured.
49 .DS
50 .TS
51 box,center;
52 c s s s s
53 c s s s s
54 c s s s s
55 l | l s | l s
56 l | l s | l s
57 l | l l | l l
58 l | c c | c c.
59 4.2BSD File Systems Tests - \fBVAX 11/750\fR
60 =
61 Logically Sequential Transfers
62 from an \fB8K/1K\fR 4.2BSD File System (Kbytes/sec.)
63 _
64 Test    Emulex SC750/Eagle      UDA50/RA81
65
66         1 Drive 2 Drives        1 Drive 2 Drives
67 _
68 read_8192       490 (69%)       620 (96%)       310 (44%)       520 (65%)
69 write_4096      380 (99%)       370 (99%)       370 (97%)       360 (98%)
70 write_8192      470 (99%)       470 (99%)       320 (71%)       410 (83%)
71 rewrite_8192    650 (99%)       620 (99%)       310 (50%)       450 (70%)
72 =
73 .T&
74 c s s s s
75 c s s s s
76 l | l s | l s
77 l | l s | l s
78 l | l l | l l
79 l | c c | c c.
80 Logically Sequential Transfers
81 from \fB4K/1K\fR 4.2BSD File System (Kbytes/sec.)
82 _
83 Test    Emulex SC750/Eagle      UDA50/RA81
84
85         1 Drive 2 Drives        1 Drive 2 Drives
86 _
87 read_8192       300 (60%)       400 (84%)       210 (42%)       340 (77%)
88 write_4096      320 (98%)       320 (98%)       220 (67%)       290 (99%)
89 write_8192      340 (98%)       340 (99%)       220 (65%)       310 (98%)
90 rewrite_8192    450 (99%)       450 (98%)       230 (47%)       340 (78%)
91 .TE
92 .DE
93 .PP
94 Note that the rate of write operations on the VAX 11/750 are ultimately
95 CPU limited in some cases.
96 The write rates saturate the CPU at a lower bandwidth than the reads
97 because they must do disk allocation in addition to moving the data
98 from the user program to the disk.
99 The UDA50/RA81 saturates the CPU at a lower transfer rate for a given
100 operation than the SC750/Eagle because
101 it causes more memory contention with the CPU.
102 We do not know if this contention is caused by
103 the UNIBUS controller or the UDA50.
104 .PP
105 The following table reports the results of test runs on a VAX 11/780
106 with 4 Megabytes of main memory.
107 .DS
108 .TS
109 box,center;
110 c s s s s s s
111 c s s s s s s
112 c s s s s s s
113 l | l s | l s | l s
114 l | l s | l s | l s
115 l | l l | l l | l l
116 l | c c | c c | c c.
117 4.2BSD File Systems Tests - \fBVAX 11/780\fR
118 =
119 Logically Sequential Transfers
120 from an \fB8K/1K\fR 4.2BSD File System (Kbytes/sec.)
121 _
122 Test    Emulex SC780/Eagle      UDA50/RA81      Sys. Ind. 9900/Eagle
123
124         1 Drive 2 Drives        1 Drive 2 Drives        1 Drive 2 Drives
125 _
126 read_8192       560 (70%)       480 (58%)       360 (45%)       540 (72%)       340 (41%)       520 (66%)
127 write_4096      440 (98%)       440 (98%)       380 (99%)       480 (96%)       490 (96%)       440 (84%)
128 write_8192      490 (98%)       490 (98%)       220 (58%)*      480 (92%)       490 (80%)       430 (72%)
129 rewrite_8192    760 (100%)      560 (72%)       220 (50%)*      180 (52%)*      490 (60%)       520 (62%)
130 =
131 .T&
132 c s s s s s s
133 c s s s s s s
134 l | l s | l s | l s
135 l | l s | l s | l s
136 l | l l | l l | l l
137 l | c c | c c | c c.
138 Logically Sequential Transfers
139 from an \fB4K/1K\fR 4.2BSD File System (Kbytes/sec.)
140 _
141 Test    Emulex SC780/Eagle      UDA50/RA81      Sys. Ind. 9900/Eagle
142
143         1 Drive 2 Drives        1 Drive 2 Drives        1 Drive 2 Drives
144 _
145 read_8192       490 (77%)       370 (66%)       n.m.    n.m.    200 (31%)       370 (56%)
146 write_4096      380 (98%)       370 (98%)       n.m.    n.m.    200 (46%)       370 (88%)
147 write_8192      380 (99%)       370 (97%)       n.m.    n.m.    200 (45%)       320 (76%)
148 rewrite_8192    490 (87%)       350 (66%)       n.m.    n.m.    200 (31%)       300 (46%)
149 .TE
150 * the operation of the hardware was suspect during these tests.
151 .DE
152 .PP
153 The dropoff in reading and writing rates for the two drive SC780/Eagle
154 tests are probably due to the file system using insufficient
155 rotational delay for these tests.
156 We have not fully investigated these times.
157 .PP
158 The following table compares data rates on VAX 11/750s directly
159 with those of VAX 11/780s using the UDA50/RA81 storage system.
160 .DS
161 .TS
162 box,center;
163 c s s s s
164 c s s s s
165 c s s s s
166 l | l s | l s
167 l | l s | l s
168 l | l l | l l
169 l | c c | c c.
170 4.2BSD File Systems Tests - \fBDEC UDA50 - 750 vs. 780\fR
171 =
172 Logically Sequential Transfers
173 from an \fB8K/1K\fR 4.2BSD File System (Kbytes/sec.)
174 _
175 Test    VAX 11/750 UNIBUS       VAX 11/780 UNIBUS
176
177         1 Drive 2 Drives        1 Drive 2 Drives
178 _
179 read_8192       310 (44%)       520 (84%)       360 (45%)       540 (72%)
180 write_4096      370 (97%)       360 (100%)      380 (99%)       480 (96%)
181 write_8192      320 (71%)       410 (96%)       220 (58%)*      480 (92%)
182 rewrite_8192    310 (50%)       450 (80%)       220 (50%)*      180 (52%)*
183 =
184 .T&
185 c s s s s
186 c s s s s
187 l | l s | l s
188 l | l s | l s
189 l | l l | l l
190 l | c c | c c.
191 Logically Sequential Transfers
192 from an \fB4K/1K\fR 4.2BSD File System (Kbytes/sec.)
193 _
194 Test    VAX 11/750 UNIBUS       VAX 11/780 UNIBUS
195
196         1 Drive 2 Drives        1 Drive 2 Drives
197 _
198 read_8192       210 (42%)       342 (77%)       n.m.    n.m.
199 write_4096      215 (67%)       294 (99%)       n.m.    n.m.
200 write_8192      215 (65%)       305 (98%)       n.m.    n.m.
201 rewrite_8192    227 (47%)       336 (78%)       n.m.    n.m.
202 .TE
203 * the operation of the hardware was suspect during these tests.
204 .DE
205 .PP
206 The higher throughput available on VAX 11/780s is due to a number
207 of factors.
208 The larger main memory size allows a larger file system cache.
209 The block allocation routines run faster, raising the upper limit
210 on the data rates in writing new files.
211 .PP
212 The next table makes the same comparison using an Emulex controller
213 on both systems.
214 .DS
215 .TS
216 box, center;
217 c s s s s
218 c s s s s
219 c s s s s
220 l | l s | l s
221 l | l s | l s
222 l | l l | l l
223 l | c c | c c.
224 4.2BSD File Systems Tests - \fBEmulex - 750 vs. 780\fR
225 =
226 Logically Sequential Transfers
227 from an \fB8K/1K\fR 4.2BSD File System (Kbytes/sec.)
228 _
229 Test    VAX 11/750 CMI Bus      VAX 11/780 SBI Bus
230
231         1 Drive 2 Drives        1 Drive 2 Drives
232 _
233 read_8192       490 (69%)       620 (96%)       560 (70%)       480 (58%)
234 write_4096      380 (99%)       370 (99%)       440 (98%)       440 (98%)
235 write_8192      470 (99%)       470 (99%)       490 (98%)       490 (98%)
236 rewrite_8192    650 (99%)       620 (99%)       760 (100%)      560 (72%)
237 =
238 .T&
239 c s s s s
240 c s s s s
241 l | l s | l s
242 l | l s | l s
243 l | l l | l l
244 l | c c | c c.
245 Logically Sequential Transfers
246 from an \fB4K/1K\fR 4.2BSD File System (Kbytes/sec.)
247 _
248 Test    VAX 11/750 CMI Bus      VAX 11/780 SBI Bus
249
250         1 Drive 2 Drives        1 Drive 2 Drives
251 _
252 read_8192       300 (60%)       400 (84%)       490 (77%)       370 (66%)
253 write_4096      320 (98%)       320 (98%)       380 (98%)       370 (98%)
254 write_8192      340 (98%)       340 (99%)       380 (99%)       370 (97%)
255 rewrite_8192    450 (99%)       450 (98%)       490 (87%)       350 (66%)
256 .TE
257 .DE
258 .PP
259 The following table illustrates the evolution of our testing
260 process as both hardware and software problems effecting
261 the performance of the Emulex SC780 were corrected.
262 The software change was suggested to us by George Goble
263 of Purdue University.
264 .PP
265 The 4.2BSD handler for RH750/RH780 interfaced disk drives
266 contains several constants which to determine how
267 much time is provided between an interrupt signaling the completion
268 of a positioning command and the subsequent start of a data transfer
269 operation. These lead times are expressed as sectors of rotational delay.
270 If they are too small, an extra complete rotation will often be required
271 between a seek and subsequent read or write operation.
272 The higher bit rate and rotational speed of the 2351A Fujitsu
273 disk drives required
274 increasing these constants.
275 .PP
276 The hardware change involved allowing for slightly longer
277 delays in arbitrating for cycles on the SBI bus by 
278 starting the bus arbitration cycle a little further ahead of
279 when the data was ready for transfer.
280 Finally we had to increase the rotational delay between consecutive
281 blocks in the file because
282 the higher bandwidth from the disk generated more memory contention,
283 which slowed down the processor.
284 .DS
285 .TS
286 box,center,expand;
287 c s s s s s s
288 c s s s s s s
289 c s s s s s s
290 l | l s | l s | l s
291 l | l s | l s | l s
292 l | l s | l s | l s
293 l | c c | c c | c c
294 l | c c | c c | c c.
295 4.2BSD File Systems Tests - \fBEmulex SC780 Disk Controller Evolution\fR
296 =
297 Logically Sequential Transfers
298 from an \fB8K/1K\fR 4.2BSD File System (Kbytes/sec.)
299 _
300 Test    Inadequate Search Lead  OK Search Lead  OK Search Lead
301         Initial SBI Arbitration Init SBI Arb.   Improved SBI Arb.       
302
303         1 Drive 2 Drives        1 Drive 2 Drives        1 Drive 2 Drives
304 _
305 read_8192       320     370     440 (60%)       n.m.    560 (70%)       480 (58%)
306 write_4096      250     270     300 (63%)       n.m.    440 (98%)       440 (98%)
307 write_8192      250     280     340 (60%)       n.m.    490 (98%)       490 (98%)
308 rewrite_8192    250     290     380 (48%)       n.m.    760 (100%)      560 (72%)
309 =
310 .T&
311 c s s s s s s
312 c s s s s s s
313 l | l s | l s | l s
314 l | l s | l s | l s
315 l | l s | l s | l s
316 l | c c | c c | c c
317 l | c c | c c | c c.
318 Logically Sequential Transfers
319 from an \fB4K/1K\fR 4.2BSD File System (Kbytes/sec.)
320 _
321 Test    Inadequate Search Lead  OK Search Lead  OK Search Lead
322         Initial SBI Arbitration Init SBI Arb.   Improved SBI Arb.       
323
324         1 Drive 2 Drives        1 Drive 2 Drives        1 Drive 2 Drives
325 _
326 read_8192       200     220     280     n.m.    490 (77%)       370 (66%)
327 write_4096      180     190     300     n.m.    380 (98%)       370 (98%)
328 write_8192      180     200     320     n.m.    380 (99%)       370 (97%)
329 rewrite_8192    190     200     340     n.m.    490 (87%)       350 (66%)
330 .TE
331 .DE
332 .ds RH Conclusions
333 .bp