BSD 4_2 development
[unix-history] / usr / doc / diskperf / tests.ms
CommitLineData
c557cacd
C
1.ds RH Tests
2.NH
3Tests
4.PP
5Our battery of tests consists of four programs,
6read_8192, write_8192, write_4096
7and rewrite_8192 originally written by [McKusick83]
8to evaluate the performance of the new file system in 4.2BSD.
9These programs all follow the the same model and are typified by
10read_8192 shown here.
11.DS
12#define BUFSIZ 8192
13main( argc, argv)
14char **argv;
15{
16 char buf[BUFSIZ];
17 int i, j;
18
19 j = open(argv[1], 0);
20 for (i = 0; i < 1024; i++)
21 read(j, buf, BUFSIZ);
22}
23.DE
24The remaining programs are included in appendix A.
25.PP
26These programs read, write with two different blocking factors,
27and rewrite logical files in structured file system on the disk
28under test.
29The write programs create new files while the rewrite program
30overwrites an existing file.
31Each of these programs represents an important segment of the
32typical UNIX file system activity with the read program
33representing by far the largest class and the rewrite the smallest.
34.PP
35A blocking factor of 8192 is used by all programs except write_4096.
36This is typical of most 4.2BSD user programs since a standard set of
37I/O support routines is commonly used and these routines buffer
38data in similar block sizes.
39.PP
40For each test run, a empty eight Kilobyte block
41file system was created in the target
42storage system.
43Then each of the four tests was run and timed.
44Each test was run three times;
45the first to clear out any useful data in the cache,
46and the second two to insure that the experiment
47had stablized and was repeatable.
48Each test operated on eight Megabytes of data to
49insure that the cache did not overly influence the results.
50Another file system was then initialized using a
51basic blocking factor of four Kilobytes and the same tests
52were run again and timed.
53A command script for a run appears as follows:
54.DS
55#!/bin/csh
56set time=2
57echo "8K/1K file system"
58newfs /dev/rhp0g eagle
59mount /dev/hp0g /mnt0
60mkdir /mnt0/foo
61echo "write_8192 /mnt0/foo/tst2"
62rm -f /mnt0/foo/tst2
63write_8192 /mnt0/foo/tst2
64rm -f /mnt0/foo/tst2
65write_8192 /mnt0/foo/tst2
66rm -f /mnt0/foo/tst2
67write_8192 /mnt0/foo/tst2
68echo "read_8192 /mnt0/foo/tst2"
69read_8192 /mnt0/foo/tst2
70read_8192 /mnt0/foo/tst2
71read_8192 /mnt0/foo/tst2
72umount /dev/hp0g
73.DE
74.ds RH Results
75.bp