I'm trying to run some tests on query times and would like to know if there is a way to turn off caching so data is read from disk every time instead of memory?
MonetDB uses memory-mapped files. The contents of these files are cached by the OS in the page cache, which in Linux will use any free memory. What I do to get fair 'cold' runs (force data being read from dist} is to
sudo bash -c "echo 1 > /proc/sys/vm/drop_caches"
(See the Kernel doc for details)Generally, there will be more fluctuation in performance results than if the data is in memory, so I recommend you to repeat this a couple of times to get consistent readings.
There is a benchmark script (ehannes.sh
) that automates much of the process for you.