How can I change memory allocation policy on Linux?
On Solaris it's done system-wide with lgrp_mem_default_policy (man page) and pmadvise (man page) is a per process equivalent that does not require root.
Linux uses different memory management subsystems than Solaris, of course, so not every tuneable has an equivalent. Looks like the numactl
utility is the closest analogue for this particular setting. Look at man 8 numactl
and man 2 set_mempolicy
.
apt-get install numactl
and apt-get install libnuma-dev
(for man pages) to the answer.
Nov 16, 2010 at 21:18