On Tue, Oct 26, 2021 at 11:25 AM Shawn Heisey <elyog...@elyograg.org> wrote:
>
> On 10/26/21 8:34 AM, Michael Gibney wrote:
> > In my experience, running Solr on CentOS 7 (comparable to RHEL 7) -- on
> > VMWare, but "ballooning" was _not_ the issue -- I found that setting
> > vm.swappiness=0 or 1 did not actually prevent swapping. Notwithstanding
> > Shawn's excellent suggestions above, if you still suspect that swapping is
> > the issue and you are ok with foregoing swap altogether, you might try
> > straight-up `swapoff -a`. This ended up being the right choice for my case,
> > fwiw.
>
> Not related to the OP, replying to Michael:
>
> I've seen some very strange behavior related to swap on Linux.  My
> server at home (Ubuntu 20, kernel 5.11.0) has 64GB of memory and two
> 6-core CPUs.  It is not running Solr.  Even with what I classify as zero
> memory pressure (40 or more gigabytes of memory used by OS disk
> caching), and with swappiness at 0 or 1, it seems to prefer swapping out
> (swap partition is 8GB) rather than just reclaiming memory from cache,
> and I had thought that lowering swappiness would reverse that
> preference.  I haven't figured out a way to keep that from happening,
> other than disabling swap.  I don't need the swap space -- 64GB is more
> than enough for what the server does.
>
> Related to the OP:
>
> I don't think swap is the problem.  Disabling swap entirely would be a
> good test to confirm.  For general server use cases, I would not
> recommend that action, but for dedicated systems with plenty of memory
> like what is described in this thread, running without swap space seems
> like a very good idea.
>
> Thanks,
> Shawn
>
>

'swappiness' changed a few years ago and the values 0 and 1 are not
intuitive.  https://eklitzke.org/swappiness

Reply via email to