NetBSD pkgsrc (package source) is a package management system for
Unix-like operating systems
Bonnie: A simple Filesystem Benchmark Program
Bonnie tests the speed of sequential file I/O using standard C library
calls. It does reads and writes of characters using STDIO; and of
blocks using system calls. Then it does a sequential pass of reading
every block, modifying one byte, and writing it back; and finally it
does random seeks followed by reads and writes of blocks. It reports
the average sustained data rate (usually limited by the drive or
controller). It is quite dependent on hardware and OS optimisations.
The per character read and write tests are generally limited by CPU
speed except on the fastest of systems. It takes some 35 SPECint92 to
read or write a file at a rate of 1MB/s using getc() and putc().
The input tests, particularly the block reads, are highly dependent on
the buffer cache size. A file size of at least four times available RAM
is needed to effectivley mask the effects of the buffer cache.
The seek tests are also dependent on the buffer cache size, since the
fraction of disk blocks which fit into the buffer cache will be found
without any actual disk access and will contribute little or no apparent
seek time to the mesurements. 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
about half its real value. The seek time includes rotational delay, and
will thus always come out higher than the specified value for a drive.
# $NetBSD: Makefile,v 1.35 2010/04/01 06:59:19 obache Exp $
DISTNAME= bonnie
PKGNAME= bonnie-2.06
PKGREVISION= 2
CATEGORIES= benchmarks
MASTER_SITES= http://www.textuality.com/bonnie/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.textuality.com/bonnie/index.html
COMMENT= Performance Test of Sequential Filesystem I/O and STDIO
NOT_FOR_PLATFORM= Interix-*-* # has only 32-bit off_t
PKG_INSTALLATION_TYPES= overwrite pkgviews
PKG_DESTDIR_SUPPORT= user-destdir
NO_CONFIGURE= yes
WRKSRC= ${WRKDIR}
USE_TOOLS+= expr groff nroff
USE_BSD_MAKEFILE= yes
MANCOMPRESSED_IF_MANZ= yes
CFLAGS.Linux+= -D_FILE_OFFSET_BITS=64
INSTALLATION_DIRS= bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1
post-extract:
${MV} ${WRKSRC}/Bonnie.c ${WRKSRC}/bonnie.c
SYSCTL?= /sbin/sysctl
benchmark:
@(cd ${WRKSRC}; ./bonnie -m nb$$(uname -r) -s $$(${EXPR} 4 \* $$(${SYSCTL} -n hw.physmem) / 1024 / 1024) | tee bonnie.out)
results:
@${MKDIR} /tmp/benches/$$(domainname)
-@${CP} ${WRKSRC}/bonnie.out /tmp/benches/$$(domainname)/bonnie.$$(uname)-$$(uname -m)-$$(uname -r).$$(hostname)
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1 2001/10/31 23:45:08 zuntum Exp $
bin/bonnie
man/cat1/bonnie.0
man/man1/bonnie.1
$NetBSD: distinfo,v 1.8 2007/01/18 11:16:56 rillig Exp $
SHA1 (bonnie.tar.gz) = f435ae56903883c8e3e011eb989783c8410f5ee3
RMD160 (bonnie.tar.gz) = 677446fde3f53e2afc2b5f1d76af2555a4779d88
Size (bonnie.tar.gz) = 7140 bytes
SHA1 (patch-aa) = e81766946655b43fbd6a7c1dc23e32987827d399
SHA1 (patch-ab) = 927415c66b7c03897aa4cbee07cd54c242272148
SHA1 (patch-ac) = 355c9bbb4f13cf8b2d092c17f0cb4f7bc0a31a9e