On Thu, 2013-08-22 at 20:08 +0200, Walter Underwood wrote:
> We warm the file buffers before starting Solr to avoid spending time
> waiting for disk IO. The script is something like this:
> 
> for core in core1 core2 core3
> do
>     find /apps/solr/data/${core}/index -type f | xargs cat > /dev/null
> done

On that subject, I will note that the reason for not just doing a simple
"cp <index_files> > /dev/null" is that the shell (sometimes? always?) is
clever enough to skip the copying when it is done directly to /dev/null.

> It makes a big difference in the first few minutes of service. Of
> course, it helps if you have enough RAM to hold the entire index.

That is actually essential if you want to perform a reproducible test.
If there is not enough free RAM for the full amount of index files, "the
first" files from find will not be cached at all and if the index has
changed since last test, that makes it pretty arbitrary which parts are
cached and which are not.
-- 
Ceterum censeo spinning drives esse delendam

Reply via email to