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>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050506000400060507050102
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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).

--------------050506000400060507050102
Content-Type: text/x-patch;
 name="readtest.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="readtest.c.patch"

*** 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);
  			}

--------------050506000400060507050102--



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