Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
+1 Look right. Let me check it out... – Aleksandr Levchuk Nov 16 '10 at 21:02
Yes, this is it. – Aleksandr Levchuk Nov 16 '10 at 21:14
I would add apt-get install numactl and apt-get install libnuma-dev (for man pages) to the answer. – Aleksandr Levchuk Nov 16 '10 at 21:18
Unless you're on Red Hat / Fedora, in which case that won't work. You didn't specify. :) (In fact, on those distributions, the numactl utility, with its man pages, are in the Base group and so installed by default on every system.) – mattdm Nov 16 '10 at 21:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.