On 9/23/24 13:44, cyusedfzfb via discuss wrote:
Hi all!
New here, signed up just new, to discuss an interesting mariadb
behaviour we are seeing, related to mariadb unexpectedly using swap space.
Look at this example:
RHEL 8.10, running mariadb-server-utils.x86_64
3:10.5.22-1.module+el8.8.0+20134+a92c7654:
[user@db ~]$ free -g
total used free shared buff/cache
available
Mem: 187 9 11 0 165 175
Swap: 3 3 0
you still have almost 95% of your total RAM listed as available, so you
are not in a "memory is tight, need to swap to make room" situation.
What you are rather seeing is that the kernel chose to move allocated,
but basically unused (based on last access time) memory pages to swap
space storage to make better use of the otherwise unused RAM, usually by
using it as part of the file system cache.
This behavior is controlled by the kernels vm.swappiness setting, the
higher the value the more aggressively will the kernel try to move
apparently unused or seldom used memory pages to swap space.
There is nothing wrong about this, and even when setting the parameter
to the lowest possible value this behavior will not stop completely.
There is usually next to no negative performance impact from this
either, actually in general quite the contrary due to being able to have
a larger file system cache.
A classic critical swap situation on the other hand would show only very
little memory listed under the "available" column, and would also show
high swap-in and swap-out rates in vmstat output.
So basically: nothing to see here, move along
--
Hartmut Holzgraefe, Principal Support Engineer (EMEA)
MariaDB Corporation | http://www.mariadb.com/
_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]