Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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
1  
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

 
discard

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.