RHEV-H Swappiness

Latest response

Hi,

We have a server with RHEV-H (Hypervisor) installed.
This server has 378GB of memory.

Swapness is configured as Linux default:

# sysctl -a | grep swap
vm.swappiness = 60

We do not intend to use more than 80% of server physical memory.
Could we use vm.swappiness = 0?

Is there any behavior or motivation to not use this configuration?

Regards

Responses

If you ever do use 80% of RAM, the system will start breaking Transparent Huge Pages down into 4k pages then running Kernel Samepage Merging to reduce the number of pages. This is a separate procedure to using swap.

With swappiness = 0 on recent RHEL6, that will actually stop swapping altogether. If you do really want to reduce swapping, try something like swappiness = 10 instead.

Personally I don't think disabling or even restricting swap is very useful. The kernel swaps because it decides it's faster to retrieve a page from swap than to retrieve the same page from disk again. Swap makes your system faster and is not harmful.

It's only if you're constantly filling or thrashing swap that there is a problem.

I haven't yet found a scenario where completely disabling swap is beneficial (happy to be enlightened).

Swap plays an additional role in RHEV-H as it is used for memory overcommit in VM's and will likely be utilised heavily by the Hypervisor... turning it off sounds like a bad idea.

How much swap do you have configured on the server? The Red Hat recommendation from the RHEV guide is (378*0.5) + 16 = 205G

I posted links to swap configuration for RHEV-H in this thread:
https://access.redhat.com/site/discussions/707903

Thank you all.

Strange to use all this swap space, even Red Hat doesn't use it on its own environment:
https://access.redhat.com/site/comment/714473

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.