You are here


VSZ behaviour with MariaDB MEMORY tables

Taxonomy upgrade extras: 

We recently had the situation that a customer complained about the Oom killer terminating the MariaDB database instance from time to time. The MariaDB database configuration was sized quit OK (about 50% of RAM was used for the database) but they did not have swap configured.

Do not underestimate performance impacts of swapping on NUMA database systems

Taxonomy upgrade extras: 

If your MariaDB or MySQL database system is swapping it can have a significant impact on your database query performance! Further it can also slow down your database shutdown and thus influence the whole reboot of your machine. This is especially painful if you have only short maintenance windows or if you do not want to spend the whole night with operation tasks.

MariaDB and MySQL swap analysis

# free
              total        used        free      shared  buff/cache   available
Mem:       16106332     3914228      367072      296508    11825032    11441608
Swap:      31250428      182924    31067504

# cat /proc/meminfo | grep ^Swap
SwapCached:        10056 kB
SwapTotal:      31250428 kB
SwapFree:       31067504 kB

# for file in /proc/*/status ; do
  awk '/VmSwap|Name/{
    if ( $2 != "0" )
      printf $2 " " $3
  }END{ print ""}' $file
done | grep kB | sort -k 2 -n -r

mysqld 29988 kB
plasmashell 19096 kB
kwin_x11 13444 kB
Xorg 13328 kB
Subscribe to RSS - swap