Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2006 15:14:04 +1300
From:      Mark Kirkwood <markir@paradise.net.nz>
To:        freebsd-stable@freebsd.org
Cc:        Pieter de Goeje <pieter@degoeje.nl>
Subject:   Re: Cached file read performance with 6.2-PRERELEASE
Message-ID:  <4589EDEC.2040504@paradise.net.nz>
In-Reply-To: <4589A921.90002@paradise.net.nz>
References:  <45888C68.10305@paradise.net.nz> <200612200816.51043.joao@matik.com.br> <4589128F.9030404@paradise.net.nz> <200612201536.25497.pieter@degoeje.nl> <4589A921.90002@paradise.net.nz>

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

Mark Kirkwood wrote:
> Pieter de Goeje wrote:

>> It would be more interesting to see how random access to a (cached) 
>> file performs in Linux vs FreeBSD, which seems a more logical pattern 
>> for a database.
>>
> 
> Agreed, and good point, I'll knock up a simple program to do random 
> and/or sequential access of a file and see what we get!
> 

Here's a (very) simple program that does block reads sequentially or 
randomly. It probably needs a little polishing, but seems to work ok for 
the size of files we are interested in: i.e < a few GB (see attached):

Results:
========

Compiled with CFLAGS=-O2 -march=i686

Gentoo - 2.6.18-gentoo-r3:
-----------------------

$ ./readtest /data0/dump/file 8192 0
random reads: 100000 elapsed: 1.2646 io rate 647805551 bytes/s

$ ./readtest /data0/dump/file 8192 1
sequential reads: 100000 elapsed: 1.1267 io rate 727075854 bytes/s


FreeBSD - 6.2-PRERELEASE #7: Mon Nov 27 19:32:33 NZDT 2006 :
------------------------------------------------------------

  ./readtest /data0/dump/file 8192 0
random reads: 100000 elapsed: 4.3669 io rate 187594060 bytes/s

$ ./readtest /data0/dump/file 8192 1
sequential reads: 100000 elapsed: 1.9679 io rate 416283642 bytes/s


So looks like we get faster overall results than dd (I guess not needing 
to send output anywhere helps)...also we seem to be slower in the random 
case too :-(. I ran these programs several times, typical results shown.

Cheers

Mark

--------------060008050409040508000700--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4589EDEC.2040504>