High swap usage on nodes even having free physical memory

Bug #1880721 reported by Marcelo Subtil Marcal
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-sysconfig
Invalid
Low
Unassigned

Bug Description

In a cloud with a high load, some nodes use swap even though physical memory is available.

Here is an example:
----
# free -h ; vmstat 1
total used free shared buff/cache available
Mem: 251G 53G 98G 21G 99G 175G
Swap: 8.0G 8.0G 12K
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r b swpd free buff cache si so bi bo in cs us sy id wa st
 0 0 8388592 103424320 879856 103802088 0 0 0 15 0 0 5 3 92 0 0
 1 0 8388592 103424496 879856 103802128 0 0 0 560 14741 26943 2 1 98 0 0
 7 0 8388592 103377280 879856 103802136 0 0 0 316 15868 32061 3 1 95 0 0
 4 0 8388592 103376992 879856 103802304 0 0 0 316 32424 101905 8 7 85 0 0
10 0 8388592 103358880 879856 103802112 0 0 0 952 40945 164563 6 4 91 0 0
 6 0 8388592 103386784 879856 103801776 0 0 0 1340 32409 115173 4 3 93 0 0
 1 0 8388592 103380840 879856 103801904 0 0 0 104 32113 106159 3 5 92 0 0
 2 0 8388592 103372448 879856 103801920 0 0 0 360 32173 100395 3 4 93 0 0
 3 0 8388592 103370408 879856 103802272 0 0 0 120 30659 103600 6 7 87 0 0
 9 0 8388592 103371216 879856 103802032 0 0 0 180 28233 94830 3 3 95 0 0
 3 0 8388592 103347240 879856 103802176 0 0 0 416 20911 50278 3 3 94 0 0
 2 0 8388592 103381936 879856 103802512 0 0 0 1424 22038 50909 3 3 94 0 0
---

It could be useful if there is a way to set swappiness = 10 (or 0) instead of the default value of 60.

Revision history for this message
Diko Parvanov (dparv) wrote :

This could be achieved by setting the charm sysctl value to the appropriate key/value pair to set the configuration you need.

Example would be:

juju config sysconfig sysctl="{ vm.swappiness : 10 }"

Changed in charm-sysconfig:
importance: Undecided → Low
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.