1 .\" $NetBSD: tests.ms,v 1.3 2000/03/13 23:03:36 soren Exp $
3 .\" Copyright (c) 1983 The Regents of the University of California.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)tests.ms 6.2 (Berkeley) 4/16/91
36 Our battery of tests consists of four programs,
37 read_8192, write_8192, write_4096
38 and rewrite_8192 originally written by [McKusick83]
39 to evaluate the performance of the new file system in 4.2BSD.
40 These programs all follow the same model and are typified by
51 for (i = 0; i < 1024; i++)
55 The remaining programs are included in appendix A.
57 These programs read, write with two different blocking factors,
58 and rewrite logical files in structured file system on the disk
60 The write programs create new files while the rewrite program
61 overwrites an existing file.
62 Each of these programs represents an important segment of the
63 typical UNIX file system activity with the read program
64 representing by far the largest class and the rewrite the smallest.
66 A blocking factor of 8192 is used by all programs except write_4096.
67 This is typical of most 4.2BSD user programs since a standard set of
68 I/O support routines is commonly used and these routines buffer
69 data in similar block sizes.
71 For each test run, a empty eight Kilobyte block
72 file system was created in the target
74 Then each of the four tests was run and timed.
75 Each test was run three times;
76 the first to clear out any useful data in the cache,
77 and the second two to insure that the experiment
78 had stablized and was repeatable.
79 Each test operated on eight Megabytes of data to
80 insure that the cache did not overly influence the results.
81 Another file system was then initialized using a
82 basic blocking factor of four Kilobytes and the same tests
83 were run again and timed.
84 A command script for a run appears as follows:
88 echo "8K/1K file system"
89 newfs /dev/rhp0g eagle
92 echo "write_8192 /mnt0/foo/tst2"
94 write_8192 /mnt0/foo/tst2
96 write_8192 /mnt0/foo/tst2
98 write_8192 /mnt0/foo/tst2
99 echo "read_8192 /mnt0/foo/tst2"
100 read_8192 /mnt0/foo/tst2
101 read_8192 /mnt0/foo/tst2
102 read_8192 /mnt0/foo/tst2