Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Dec 2006 14:49:53 +1300
From:      Mark Kirkwood <markir@paradise.net.nz>
To:        freebsd-performance@freebsd.org
Subject:   Re: Cached file read performance
Message-ID:  <458B39C1.2080906@paradise.net.nz>
In-Reply-To: <458B3651.8090601@paradise.net.nz>
References:  <458B3651.8090601@paradise.net.nz>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Mark Kirkwood wrote:

> Anyway on to the results: I used the attached program to read a cached 

Silly bug in attached program : lseek failure test has 1 instead of -1 
(finger trouble).

[-- Attachment #2 --]
*** readtest.c.orig	Fri Dec 22 14:43:42 2006
--- readtest.c	Fri Dec 22 14:43:24 2006
***************
*** 103,109 ****
  			}
  		} else {
  			offset = (off_t) (random() % (numblocks - 1)) * blocksz;
! 			if (lseek(fd, offset, SEEK_SET) == 1) {
  				perror("seek failed");
  				exit(1);
  			}
--- 103,109 ----
  			}
  		} else {
  			offset = (off_t) (random() % (numblocks - 1)) * blocksz;
! 			if (lseek(fd, offset, SEEK_SET) == -1) {
  				perror("seek failed");
  				exit(1);
  			}
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?458B39C1.2080906>