Skip to content

Instantly share code, notes, and snippets.

@BruceWind
Last active March 11, 2024 08:52
Show Gist options
  • Save BruceWind/6307edde200b811e8d3cfcb288f26163 to your computer and use it in GitHub Desktop.
Save BruceWind/6307edde200b811e8d3cfcb288f26163 to your computer and use it in GitHub Desktop.
Tricks to reduce memory usage in Proxmox Virtual Environment (PVE).

let VM(linux) flush the memory cache

switch to root user, and add an interval task into crontab in linux VM:

0 */3 * * * /bin/sh -c 'echo 1 > /proc/sys/vm/drop_caches'

controls the tendency of the kernel to swap out memory pages to the swap

echo "vm.swappiness=70" >> /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment