[PATCH] ctdb-scripts: Drop script configuration variable CTDB_MONITOR_SWAP_USAGE

Martin Schwenke martin at meltin.net
Thu May 2 10:42:31 UTC 2019


CTDB's system memory monitoring in 05.system.script monitors both main
memory and swap.  Monitoring of swap is based on the idea that swap
space stacks on top of main memory, so that when a system starts
filling swap space then this is supposed to be a good sign that the
system is running out of memory.  Additionally, performance on a Linux
system tends to be destroyed by the I/O associated with a lot of
swapping to spinning disks.

However, some platforms default to creating only 4GB of swap space
even when there is 128GB of main memory.  With such a small swap to
main memory ratio, memory pressure can force swap to be nearly full
even when a significant amount of main memory is still available and
the system is performing well.  This suggests that checking swap
utilisation might be less than useful in many circumstances.

So, remove the separate swap space checking and change the memory
check to cover the total of main memory and swap space.

Test function set_mem_usage() still takes an argument for each of main
memory and swap space utilisation.  For simplicity, the same number is
now passed twice to make the intended results comprehensible.  This
could be changed later.

A couple of tests are cleaned up to no longer use hard-coded
/proc/meminfo and ps output.

Pipeline: https://gitlab.com/samba-team/devel/samba/pipelines/59394125

Please review and maybe push...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ctdb-scripts-Drop-script-configuration-variable-CTDB.patch
Type: text/x-patch
Size: 14965 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190502/7eb70246/0001-ctdb-scripts-Drop-script-configuration-variable-CTDB.bin>


More information about the samba-technical mailing list