> In any case, when doing any kind of benchmarking that involves disk
access, 
> you must clear the OS disk cache so that the algorithm used by the OS is 
> removed from the equation (and also to be able to compare results),
otherwise 
> all you're doing is benchmarking a moving target.

In Linux, if you open up a file with O_DIRECT I believe the OS will not put
it into the file system buffers (OS disk chace).

This works exceptionally well for VERY VERY LARGE databases that take up
more than the available RAM and you prefer to use your RAM for database page
caches/query caches rather than OS filesystem buffers (and avoid the
double-caching effect).

I don't know if you can force a database to be opened with O_DIRECT though
in sqlite.

Your hard drive usually has a read-ahead cache too, so that also can
interfere with true disk-bound benchmarking.

Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK & USA -
www.premiumdata.net 

Reply via email to