On Thu, 2016-11-10 at 16:42 -0700, Shawn Heisey wrote:
> If the machine that Solr is installed on is using swap, that means
> you're having serious problems, and your performance will be
> TERRIBLE. 

Agreed so far.

> This kind of problem cannot be caused by Solr if it is properly
> configured for the machine it's running on.

That is practically a tautology.


Most of the Solr setups I have worked with has been behaving as one
would hope with regards to swap, but on two occasions I have
experienced heavy swapping with multiple gigabytes free for disk cache.
In both cases, the cache-to-index size was fairly low (let's say <
10%). My guess (I don't know the intrinsics of memory mapping vs.
swapping) is that the aggressive IO for the memory mapping caused the
kernel to start swapping parts of the JVM heap to get better caching of
storage data. Yes, with terrible performance as a result.

No matter the cause, the swapping problems were "solved" by effectively
disabling the swap (swappiness 0). We did try with very conservative
swapping first (swappiness 5 or something like that), but that did not
work. Although that meant less free memory for disk caching, as nothing
were no longer swapped, it solved our performance problems.


Disabling swapping is easy to try, so I suggest doing just that.

- Toke Eskildsen, State and University Library, Denmark

Reply via email to