Some initial tests using read caching

David Collier-Brown -- Customer Engineering David.Collier-Brown at Sun.COM
Tue May 20 15:41:25 GMT 2003

   After the dbench tests looked positive, I did a
version of fileio.c and a test harness to see what the
performance of read caching was going to be like.

   The first graph (qfs.gif) is of qfs read size versus
the size of the read buffer in KB. The test was repeated
with 4 through 32 MB files.

   With the 4 MB files, you can see the read time fall
rapidly until the buffer is 4 KB, then it levels out.
It continues to be good up to and past the optimal read
  size for that particular stripe, which is 1 MB.  There
is a big spike at 4 MB, which only showed up once, for
a 4 MB file. It may be an outlier, but more about that

   For the 8, 16 and 32 MB files, the performance
rose until we were at about 8 KB, then leveled off
and stayed good up past 1 MB. There was a gentle
rise in response time past 1 MB, which hI saw all but
one time with a 4 MB file.

   The pattern for UFS was quite similar, but I don't
have a similar array to do a comparison test with.
My single-fast-disk machine was about 10 times slower,
of which some unknown but significant amount was due to
the lack of RAID.
   That is shown is the second graph (ufs.gif).

   In this diagram, I also measured the behavior
with no cache, and plotted it as a buffer size of 0 KB.
   The data is noisy (I only took a few samples),
but the shape of the curve is similar, so I expect
we will see similar performance gains for UFS arrays
on pretty much any ufs.  I have no opinion about ext2
or 3fs, as I don't have anything like a comparable

   For large files, and for disks or RAID
arrays which benefit from large reads, I expect to see
improvements in the order of .55*100/.25 => 20% to as
much as 5.5*100/4=> 37%.
   I need to apply  bit more science in this, but so far
the results look promising.

David Collier-Brown,           | Always do right. This will gratify
Sun Microsystems DCMO          | some people and astonish the rest.
Toronto, Ontario               |
(905) 415-2849 or x52849       | davecb at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qfs.gif
Type: image/gif
Size: 7180 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ufs.gif
Type: image/gif
Size: 5931 bytes
Desc: not available
Url :

More information about the samba-technical mailing list