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