Date: Tue, 10 Aug 2010 18:58:06 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r211152 - user/des/phybs Message-ID: <201008101858.o7AIw6Bh006102@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Tue Aug 10 18:58:06 2010 New Revision: 211152 URL: http://svn.freebsd.org/changeset/base/211152 Log: Increase MINSIZE; there isn't much point in doing 512-byte transactions, as they will always be either perfectly aligned or short. Increase STEP to MAXSIZE * 4; having STEP equal to MAXSIZE means that the last round actually tests sequential reading / writing, which is not what we're after. Instead of testing all offsets from 0 to size, test 0 and power-of-two multiples of BSIZE, since we assume that the physical block size is a power-of-two multiple of BSIZE. This should both shorten the test's run time and improve the significance of its output. Modified: user/des/phybs/phybs.c Modified: user/des/phybs/phybs.c ============================================================================== --- user/des/phybs/phybs.c Tue Aug 10 18:29:39 2010 (r211151) +++ user/des/phybs/phybs.c Tue Aug 10 18:58:06 2010 (r211152) @@ -36,9 +36,10 @@ #include <string.h> #include <unistd.h> -#define MINSIZE 512 +#define BSIZE 512 +#define MINSIZE 1024 #define MAXSIZE 8192 -#define STEP MAXSIZE +#define STEP (MAXSIZE * 4) #define COUNT 65536 static int opt_r = 0; @@ -137,9 +138,12 @@ main(int argc, char *argv[]) printf("%8s%8s%8s%8s%12s%8s%8s\n", "count", "size", "offset", "step", "msec", "tps", "kBps"); - for (size_t size = MINSIZE; size <= MAXSIZE; size *= 2) - for (off_t offset = 0; offset < (off_t)size; offset += 512) + for (size_t size = MINSIZE; size <= MAXSIZE; size *= 2) { + printf("\n"); + scan(fd, size, 0, STEP, COUNT); + for (off_t offset = BSIZE; offset <= (off_t)size; offset *= 2) scan(fd, size, offset, STEP, COUNT); + } close(fd); exit(0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008101858.o7AIw6Bh006102>