PageRenderTime 17ms CodeModel.GetById 9ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/share/doc/papers/diskperf/tests.ms

https://bitbucket.org/freebsd/freebsd-head/
Unknown | 109 lines | 108 code | 1 blank | 0 comment | 0 complexity | e2f9be541027c2905e339f048983afe2 MD5 | raw file
  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. All advertising materials mentioning features or use of this software
 13.\"    must display the following acknowledgement:
 14.\"	This product includes software developed by the University of
 15.\"	California, Berkeley and its contributors.
 16.\" 4. Neither the name of the University nor the names of its contributors
 17.\"    may be used to endorse or promote products derived from this software
 18.\"    without specific prior written permission.
 19.\"
 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 30.\" SUCH DAMAGE.
 31.\"
 32.\"	@(#)tests.ms	6.2 (Berkeley) 4/16/91
 33.\" $FreeBSD$
 34.\"
 35.ds RH Tests
 36.NH
 37Tests
 38.PP
 39Our battery of tests consists of four programs,
 40read_8192, write_8192, write_4096
 41and rewrite_8192 originally written by [McKusick83]
 42to evaluate the performance of the new file system in 4.2BSD.
 43These programs all follow the same model and are typified by
 44read_8192 shown here.
 45.DS
 46#define	BUFSIZ 8192
 47main( argc, argv)
 48char **argv;
 49{
 50	char buf[BUFSIZ];
 51	int i, j;
 52
 53	j = open(argv[1], 0);
 54	for (i = 0; i < 1024; i++)
 55		read(j, buf, BUFSIZ);
 56}
 57.DE
 58The remaining programs are included in appendix A.
 59.PP
 60These programs read, write with two different blocking factors,
 61and rewrite logical files in structured file system on the disk
 62under test.
 63The write programs create new files while the rewrite program
 64overwrites an existing file.
 65Each of these programs represents an important segment of the
 66typical UNIX file system activity with the read program
 67representing by far the largest class and the rewrite the smallest.
 68.PP
 69A blocking factor of 8192 is used by all programs except write_4096.
 70This is typical of most 4.2BSD user programs since a standard set of
 71I/O support routines is commonly used and these routines buffer
 72data in similar block sizes.
 73.PP
 74For each test run, an empty eight Kilobyte block
 75file system was created in the target
 76storage system.
 77Then each of the four tests was run and timed.
 78Each test was run three times;
 79the first to clear out any useful data in the cache,
 80and the second two to insure that the experiment
 81had stablized and was repeatable.
 82Each test operated on eight Megabytes of data to
 83insure that the cache did not overly influence the results.
 84Another file system was then initialized using a
 85basic blocking factor of four Kilobytes and the same tests
 86were run again and timed.
 87A command script for a run appears as follows:
 88.DS
 89#!/bin/csh
 90set time=2
 91echo "8K/1K file system"
 92newfs /dev/rhp0g eagle
 93mount /dev/hp0g /mnt0
 94mkdir /mnt0/foo
 95echo "write_8192 /mnt0/foo/tst2"
 96rm -f /mnt0/foo/tst2
 97write_8192 /mnt0/foo/tst2
 98rm -f /mnt0/foo/tst2
 99write_8192 /mnt0/foo/tst2
100rm -f /mnt0/foo/tst2
101write_8192 /mnt0/foo/tst2
102echo "read_8192 /mnt0/foo/tst2"
103read_8192 /mnt0/foo/tst2
104read_8192 /mnt0/foo/tst2
105read_8192 /mnt0/foo/tst2
106umount /dev/hp0g
107.DE
108.ds RH Results
109.bp