OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 22-Aug-2004 11:48:46 Branch: HEAD Handle: 2004082210484500 Added files: openpkg-src/bonnie bonnie.patch bonnie.spec Log: new package: bonnie 2.0.6 (The Bonnie Disk I/O Benchmark) Summary: Revision Changes Path 1.1 +226 -0 openpkg-src/bonnie/bonnie.patch 1.1 +107 -0 openpkg-src/bonnie/bonnie.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/bonnie/bonnie.patch ============================================================================ $ cvs diff -u -r0 -r1.1 bonnie.patch --- /dev/null 2004-08-22 11:48:46 +0200 +++ bonnie.patch 2004-08-22 11:48:46 +0200 @@ -0,0 +1,226 @@ +Index: Bonnie.c +--- Bonnie.c.orig 1996-08-28 18:23:49 +0200 ++++ Bonnie.c 2004-08-22 11:45:20 +0200 +@@ -179,7 +179,7 @@ + if (bufindex == Chunk / IntSize) + bufindex = 0; + buf[bufindex++]++; +- if (lseek(fd, (off_t) -words, 1) == -1) ++ if (lseek(fd, -words, 1) == -1) + io_error("relative lseek(2)"); + if (write(fd, (char *) buf, words) == -1) + io_error("re write(2)"); +@@ -288,6 +288,7 @@ + { /* child process */ + + /* set up and wait for the go-ahead */ ++ close(0); + close(seek_feedback[0]); + close(seek_control[1]); + newfile(name, &fd, &stream, 0); +@@ -303,7 +304,12 @@ + /* loop until we read a 0 ticket back from our parent */ + while(seek_tickets[0]) + { /* until Mom says stop */ +- doseek((long) (random() % (size / Chunk)), fd, ++ off_t seekto; ++ if (size < ((off_t)1 << 32)) ++ seekto = random() % (size / Chunk); ++ else ++ seekto = ((off_t)random() << 32 + random()) % (size / Chunk); ++ doseek(seekto, fd, + ((lseek_count++ % UpdateSeek) == 0)); + if (read(seek_control[0], seek_tickets, 1) != 1) + io_error("read ticket"); +@@ -413,7 +419,7 @@ + printf("K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec "); + printf("%%CPU /sec %%CPU\n"); + +- printf("%-8.8s %4d ", machine, size / (1024 * 1024)); ++ printf("%-8.8s %4ld ", machine, (long)(size / (1024 * 1024))); + printf("%5d %4.1f %5d %4.1f %5d %4.1f ", + (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)), + delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0, +@@ -529,7 +535,7 @@ + { + char buf[Chunk]; + +- sprintf(buf, "Bonnie: drastic I/O error (%s)", message); ++ sprintf(buf, "\nBonnie: drastic I/O error (%s)", message); + perror(buf); + exit(1); + } +@@ -568,7 +574,7 @@ + + /* touch a word */ + buf[((int) random() % (size/IntSize - 2)) + 1]--; +- if (lseek(fd, (long) probe, 0) != probe) ++ if (lseek(fd, probe, 0) != probe) + io_error("lseek in doseek update"); + if (write(fd, (char *) buf, size) == -1) + io_error("write in doseek"); +Index: bonnie.1 +--- bonnie.1.orig 1996-08-29 03:42:42 +0200 ++++ bonnie.1 2004-08-22 11:43:30 +0200 +@@ -1,92 +1,69 @@ +-.\"------- +-.\" Man page portability notes +-.\" +-.\" These are some notes on conventions to maintain for greatest +-.\" portability of this man page to various other versions of +-.\" nroff. +-.\" +-.\" When you want a \ to appear in the output, use \e in the man page. +-.\" (NOTE this comes up in the rc grammar, where to print out '\n' the +-.\" man page must contain '\en'.) +-.\" +-.\" Evidently not all versions of nroff allow the omission of the +-.\" terminal " on a macro argument. Thus what could be written +-.\" +-.\" .Cr "exec >[2] err.out +-.\" +-.\" in true nroffs must be written +-.\" +-.\" .Cr "exec >[2] err.out" +-.\" +-.\" instead. +-.\" +-.\" Use symbolic font names (e.g. R, I, B) instead of the standard +-.\" font positions 1, 2, 3. Note that for Xf to work the standard +-.\" font names must be single characters. +-.\" +-.\" Note that sentences should end at the end of a line. nroff and +-.\" troff will supply the correct intersentence spacing, but only if +-.\" the sentences end at the end of a line. Explicit spaces, if given, +-.\" are apparently honored and the normal intersentence spacing is +-.\" supressed. +-.\" +-.\" DaviD W. Sanderson +-.\"------- +-.\" Dd distance to space vertically before a "display" +-.\" These are what n/troff use for interparagraph distance +-.\"------- +-.if t .nr Dd .4v +-.if n .nr Dd 1v +-.\"------- +-.\" Sp space down the interparagraph distance +-.\"------- +-.de Sp +-.sp \\n(Ddu +-.. +-.\"------- +-.\" Ds begin a display, indented .5 inches from the surrounding text. +-.\" +-.\" Note that uses of Ds and De may NOT be nested. +-.\"------- +-.de Ds +-.Sp +-.in +0.5i +-.nf +-.. +-.\"------- +-.\" De end a display (no trailing vertical spacing) +-.\"------- +-.de De +-.fi +-.in +-.. +-.TH Bonnie 1 "2.0.6" Textuality +-.SH NAME +-Bonnie - File system benchmark +-.SH "SYNOPSIS" +-.B Bonnie +-.RI "[-d\ scratch-dir]" +-.RI "[-html]" +-.RI "[-m\ machine-label]" +-.RI "[-s\ size-in-Mb]" +-.SH "OPTIONS" +-.PP +- -d scratch-dir : Write scratch file in named directory (default: ".") +- -html : Generate HTML output +- -m machine-label : use <machine-label> to label report +- -s size-in-Mb : how many Mb to use for testing (default: 100) +-.\"------- +-.SH "DESCRIPTION" +-.\"------- +-.I Bonnie +-measures the performance of UNIX filesystem operations. +-For details, see http://www.textuality.com/bonnie/ +-.\"------- +-.SH "AUTHOR" +-.\"------- +-.I Bonnie +-was written by Tim Bray, +-([EMAIL PROTECTED]), +-.I Bonnie +-is copyrighted 1990-1996 by Tim Bray. +-For details, see http://www.textuality.com/bonnie/copyright.html ++.\" $FreeBSD: ports/benchmarks/bonnie/files/bonnie.1,v 1.1 2002/08/27 15:53:51 obrien Exp $ ++.\" The following requests are required for all man pages. ++.Dd May 18, 1995 ++.Os UNIX ++.Dt BONNIE 1 ++.Sh NAME ++.Nm bonnie ++.Nd Performance Test of Filesystem I/O ++.Sh SYNOPSIS ++.Nm bonnie ++.Op Fl d Ar scratch-dir ++.Op Fl s Ar size-in-MB ++.Op Fl m Ar machine-label ++ ++.Sh DESCRIPTION ++.Nm Bonnie ++tests the speed of file I/O from standard C library calls. ++It reads and writes 8KB blocks to find the maximum sustained ++data rate (usually limited by the drive or controller) and additionally ++rewrites the file (better simulating normal operating conditions and ++quite dependent on drive and OS optimisations). ++ ++The per character read and write tests are generally limited by CPU speed ++only on current generation hardware. It takes some 35 SPECint92 to read ++or write a file at a rate of 1MB/s using getc() and putc(). ++ ++The seek test results depend on the buffer cache size, since the fraction ++of disk blocks that fits into the buffer cache will be found without any ++disk operation and will contribute zero seek time samples. ++(See ++.Sx BUGS ++below.) ++ ++.Sh OPTIONS ++.Bl -tag -width indent ++.It Fl d Ar scratch-dir ++Specify the directory where the test file gets written. The default ++is the current directory. Make sure there is sufficient free space ++available on the partition this directory resides in. ++.It Fl s Ar size-in-MB ++Specify the size of the test file in MByte. This much space must be ++available for the tests to complete. ++.It Fl m Ar machine-label ++Specify a label to be written in the first column of the result table. ++.El ++ ++.Sh SEE ALSO ++.Xr iozone 1 , ++.Xr iostat 8 ++ ++.Sh AUTHOR ++.Nm Bonnie ++was written by Tim Bray <[EMAIL PROTECTED]>. ++ ++.Sh BUGS ++.Nm Bonnie ++tries hard to measure disk performance and not the quality of the ++buffer cache implementation. In merged buffer caches common today, ++the buffer cache size is often only limited by total RAM on an otherwise ++unloaded system. Be sure to use a file at least twice at large as ++available RAM to protect against artificially high results. ++ ++There is no way to keep the buffer cache from increasing the reported ++seek rate. This is because the fraction of accesses corresponding to the ++amount of the file cached, will be done without seeks. ++If your buffer cache is half the size of the file used, then half the ++requests will be satisfied immediately, and and the seek rate printed ++will be twice the actual value. ++ @@ . patch -p0 <<'@@ .' Index: openpkg-src/bonnie/bonnie.spec ============================================================================ $ cvs diff -u -r0 -r1.1 bonnie.spec --- /dev/null 2004-08-22 11:48:46 +0200 +++ bonnie.spec 2004-08-22 11:48:46 +0200 @@ -0,0 +1,107 @@ +## +## bonnie.spec -- OpenPKG RPM Specification +## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/> +## Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]> +## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: bonnie +Summary: The Bonnie Disk I/O Benchmark +URL: http://www.textuality.com/bonnie/ +Vendor: Tim Bray +Packager: The OpenPKG Project +Distribution: OpenPKG +Class: EVAL +Group: Benchmark +License: Open Source +Version: 2.0.6 +Release: 20040822 + +# list of sources +Source0: http://www.textuality.com/bonnie/bonnie.tar.gz +Patch0: bonnie.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130 +PreReq: OpenPKG, openpkg >= 20040130 +AutoReq: no +AutoReqProv: no + +%description + Bonnie tests the speed of file I/O using standard C library calls. + It does reads and writes of blocks, testing for the limit of + sustained data rate (usually limited by the drive or controller) and + updates on a file (better simulating normal operating conditions and + quite dependent on drive and OS optimisations). + + The per-character read and write tests are generally limited by + CPU speed only on current-generation hardware. It takes some 35 + SPECint92 to read or write a file at a rate of 1MB/s using getc() + and putc(). + + The seek tests are dependent on the buffer cache size, since the + fraction of disk blocks that fits into the buffer cache will be + found without any disk operation and will contribute zero seek time + readings. I.e. if the buffer cache is 16MB and the Bonnie test file + is 32MB in size, then the seek time will come out as half its real + value. The seek time includes rotational delay, and will thus always + come out higher than specified for a drive. + +%track + prog bonnie = { + disabled + comment = "rse: no versioned tarball available, but no longer changed anyway" + version = %{version} + url = http://www.textuality.com/bonnie/download.html + regex = bonnie\.tar\.gz + } + +%prep + %setup -q -c + %patch -p0 + +%build + CC="%{l_cc}" + CFLAGS="%{l_cflags -O}" + case "%{l_platform -t}" in + *-sunos* ) CFLAGS="$CFLAGS -DSysV" ;; + esac + $CC $CFLAGS -o bonnie Bonnie.c + +%install + rm -rf $RPM_BUILD_ROOT + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/bin \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1 + %{l_shtool} install -c -s -m 755 \ + bonnie $RPM_BUILD_ROOT%{l_prefix}/bin/ + %{l_shtool} install -c -m 644 \ + bonnie.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]