Date: Tue, 12 Jul 2005 14:58:36 -0400 From: Mike Tancsa <mike@sentex.net> To: freebsd-ports@FreeBSD.org Subject: Everyone's fav benchmark bonnie Message-ID: <6.2.1.2.0.20050712134954.078093c0@64.7.153.2>
next in thread | raw e-mail | index | archive | help
It looks like there are a couple of minor bugs in Bonnie with assumptions about size that are wrong e.g. [releng5-865]# bonnie -s 3000 -d /usr File '/usr/Bonnie.23191', size: -1149239296 Writing with putc()...^C [releng5-865]# Notice the negative value for size % diff -u Bonnie.c mike.c --- Bonnie.c Wed Aug 28 12:23:49 1996 +++ mike.c Tue Jul 12 14:15:52 2005 @@ -146,7 +146,7 @@ /* size is in meg, rounded down to multiple of Chunk */ size *= (1024 * 1024); size = Chunk * (size / Chunk); - fprintf(stderr, "File '%s', size: %ld\n", name, size); + fprintf(stderr, "File '%s', size: %lld\n", name, size); /* Fill up a file, writing it a char at a time with the stdio putc() call */ fprintf(stderr, "Writing with putc()..."); @@ -568,7 +568,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"); Without these changes, it barfs on tests > 2G File '/usr/Bonnie.1166', size: 5242880000 Writing with putc()...done Rewriting...done Writing intelligently...done Reading with getc()...done Reading intelligently...done Seeker 1...Seeker 2...Seeker 3...start 'em...Bonnie: drastic I/O error (lseek in doseek update): Invalid argument Bonnie: drastic I/O error (lseek in doseek update): Invalid argument Bonnie: drastic I/O error (lseek in doseek update): No such file or directory Bonnie: drastic I/O error (pipe read): No such file or directory -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.2.1.2.0.20050712134954.078093c0>