Reference Name: Red Hat RHEL 8 Swappiness Algorithm Setting Requires
Severity: High
Status: Changes affect all RHEL 8 Release Versions
Impact
RHEL 8 host systems can experience swap space usage, even though swap behavior is very low and there is plenty of memory. This significantly slows application behavior, pushing in-memory activity to swap space on device (RHEL Swap Space on disk/flash storage).
Description
Numerous virtual memory management changes were made between RHEL 7 and RHEL 8 to account for much faster storage subsystem interaction with virtual memory operations. One of these changes involved the RHEL 8 Swappiness Algorithm. The Swappiness setting in the algorithm was changed, and requires resetting back to the RHEL 7 default value. NOTE: RHEL 9 Swappiness Algorithm was reverted to the RHEL 7 default tuning values, and does not require this fix.
Solution
Please carefully review the following Red Hat Solutions notes to change the Swappiness Algorithm settings to an appropriate configuration to SAS. The first link discusses the difference in behavior between RHEL 7 and RHEL 8. The second link shows several ways to return to RHEL 7 Swappiness.
· Swappiness Algorithm – General Setting - Change in swap behavior between RHEL 7 and RHEL 8 kernels - Red Hat Customer Portal· Swappiness Algorithm - Cgroups Settings https://access.redhat.com/solutions/6785021 Premature swapping while there is still plenty of pagecache to be reclaimed - Red Hat Customer Porta...
For RHEL 8 we suggest using the vm.force_cgroup_v2_swappiness feature
# echo "vm.force_cgroup_v2_swappiness=1" >> /etc/sysctl.d/99-sysctl.conf
# sysctl -p /etc/sysctl.d/99-sysctl.conf
The tuned config file for throughput-performance already sets vm.swappiness to 10. Tuned profile virtual-guest inherits throughput-performance. These are the profiles recommended for SAS environments.
If you have questions or require any assistance with this topic, please contact your SAS Technical Support Representative.