Topic
  • 2 replies
  • Latest Post - ‏2012-09-26T12:21:31Z by pperf
PowerLinuxFAQ
PowerLinuxFAQ
18 Posts

Pinned topic AIX related question. RSET and MCM.

‏2012-09-25T14:33:12Z |
On AIX, we can create a RSET and contain processes into the RSET and set the malloc option to MCM
     export MEMORY_AFFINITY=MCM
 
What is equivalent of RSET and MCM settings in Linux running on Power systems (RedHat)?
     and 
Is there a similar equivalent on x86 systems with Linux?
Updated on 2012-09-26T12:21:31Z at 2012-09-26T12:21:31Z by pperf
  • AntonBlanchard
    AntonBlanchard
    1 Post

    Re: AIX related question. RSET and MCM.

    ‏2012-09-25T15:11:09Z  
    Unlike AIX, the default memory allocation policy on Linux is node local (MCM in AIX speak). 
    One simple way to bind processes to CPUs is with the taskset command: 
     
    taskset -c 0-4 <command> 
     
    You can also use the numactl command. To bind to a set of CPUs:
     
    numactl --physcpubind=0-4 <command>
     
    Or to bind to a node: 
     
    numactl --cpunodebind=0 <command>
     
    To get an outline of the topology of the machine: 
     
    numactl --hardware 
     
    numactl can also be used to specify a memory allocation policy:
    --preferred (the default) to allocate locally and fall back to other nodes,
    --localalloc to allocate locally and fail if it cant be satistified,
    --interleave to interleave across nodes,
    --membind to allocate from a specific node 
     
    There are more complicated methods (cpusets, containers etc), but I rarely use them unless I have to.
    The same commands work on both x86 and POWER Linux.
    Updated on 2012-09-25T15:11:09Z at 2012-09-25T15:11:09Z by AntonBlanchard
  • pperf
    pperf
    6 Posts

    Re: AIX related question. RSET and MCM.

    ‏2012-09-26T12:21:31Z  
    Unlike AIX, the default memory allocation policy on Linux is node local (MCM in AIX speak). 
    One simple way to bind processes to CPUs is with the taskset command: 
     
    taskset -c 0-4 <command> 
     
    You can also use the numactl command. To bind to a set of CPUs:
     
    numactl --physcpubind=0-4 <command>
     
    Or to bind to a node: 
     
    numactl --cpunodebind=0 <command>
     
    To get an outline of the topology of the machine: 
     
    numactl --hardware 
     
    numactl can also be used to specify a memory allocation policy:
    --preferred (the default) to allocate locally and fall back to other nodes,
    --localalloc to allocate locally and fail if it cant be satistified,
    --interleave to interleave across nodes,
    --membind to allocate from a specific node 
     
    There are more complicated methods (cpusets, containers etc), but I rarely use them unless I have to.
    The same commands work on both x86 and POWER Linux.
     Nice information,  Thanks Anton!