4.4 and memory usage

The Linux kernel provides a tweakable setting that controls how often the swap file is used, called swappiness

A swappiness setting of zero means that the disk will be avoided unless absolutely necessary (you run out of memory), while a swappiness setting of 100 means that programs will be swapped to disk almost instantly.

Ubuntu system comes with a default of 60, meaning that the swap file will be used fairly often if the memory usage is around half of my RAM. You can check your own system's swappiness value by running:

Code:
root@ahmed:~# cat /proc/sys/vm/swappiness
60
root@ahmed:~#

you can change the system swappiness value, open /etc/sysctl.conf as root. Then, change or add this line to the file:

vm.swappiness = 10

Reboot for the change to take effect

You can also change the value while your system is still running

sysctl vm.swappiness=10
 
Currently swap is off w/swappiness=0 so assume to ought to avoid swapping out pages at all.

At what levels are people allocating host memory for VM usage while remembering to be able to migrate VMs from a downed/upgrading host?
 
I don't think having swappiness set to zero is a good idea as node kernel will start sending OOM to kill application to preserve any needed memory , I usually set it to 10 to minimize swap paging and yes I usually allocate 1 GB of memory for the node itself and allocate the rest the VMs/CTs
 
I checked the tuned profiles that Red Hat distributes in their systems. The profiles "virtual-guest" and "virtual-host" both use vm.swappiness=10. According to this the PVE installer should use a lower default value than 60 (which is the Debian default).
 
I checked the tuned profiles that Red Hat distributes in their systems. The profiles "virtual-guest" and "virtual-host" both use vm.swappiness=10. According to this the PVE installer should use a lower default value than 60 (which is the Debian default).
I agree.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!