Comments - Swap usage won't decrease

7 years, 10 months ago Alexandra Arreaza

We have swap usage monitoring in place and it's have been alerting every single day since the DB import took place because the swap % threshold has been less than 20 (this is just an example, not relevant in this case).

The workload wasn't heavy (it happened during non-peak hours on the donor node) and it isn't something that would be triggered every time a DB import is being done.

We have done DB imports in the past without causing high swap usage at all. Sometimes it'd cleared itself after a couple of days, but this time it's been beyond that.

Restarting the server would cause swap usage to go back to normal, but we don't want to use a MySQL restart as a workaround.

Btw, we are using CentOS 6.

 
7 years, 10 months ago Harald Reindl

when systemload don't increase there is nothing wrong with swap out rarely used memory pages

if you are annoyed by swap then just buy RAM for your machines which is cheap these days and on most workloads you can even disable swap entirely

 
7 years, 9 months ago Alexandra Arreaza

It isn't rarely swapping but constantly since then, even though the system load has decreased.

It seems like adding a few parameters can improve this behaviour (I will have to test it first):

- innodb_buffer_pool_populate (under [mysqld] section) - flush_caches (under [mysqld_safe] section) - numa_interleave (under [mysqld_safe] section)

(taken from https://www.percona.com/doc/percona-server/5.5/performance/innodb_numa_support.html)

I don't think adding more RAM represents a workaround if the memory utilisation isn't balanced within a NUMA architecture.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.