On 11/11/2016 6:46 AM, Toke Eskildsen wrote:
> 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. 

That's really weird, and sounds like a broken operating system.  I've
had other issues with swap, but in those cases, free memory was actually
near zero, and it sounds like your situation was not the same.  So the
OP here might be having similar problems even if nothing's
misconfigured.  If so, your solution will probably help them.

> No matter the cause, the swapping problems were "solved" by
> effectively disabling the swap (swappiness 0).

Solr certainly doesn't need (or even want) swap, if the machine is sized
right.  I've read some things saying that Linux doesn't behave correctly
if you completely get rid of all swap, but setting swappiness to zero
sounds like a good option.  The OS would still utilize swap if it
actually ran out of physical memory, so you don't lose the safety valve
that swap normally provides.

Thanks,
Shawn

Reply via email to