• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

numactl Command Examples in Linux

by admin

numactl is a Linux utility that provides control over NUMA (Non-Uniform Memory Access) policy for processes or shared memory. NUMA is a computer memory design in which the memory access time depends on the memory location relative to a processor. numactl allows the user to specify which NUMA node a process should run on, as well as which memory should be allocated from for the process. This can be useful for optimizing performance and reducing latency in multi-node NUMA systems.

By default, processes run on the first NUMA node, and memory is allocated from the system-wide memory pool. numactl provides options to specify NUMA policy at the process level, such as which NUMA node the process should run on, or which NUMA node should be used for allocating its memory. numactl also provides options for controlling the memory policy for shared memory, such as interleave policy and memory binding.

numactl can be useful for improving performance for applications that have specific NUMA requirements or for applications that experience performance degradation due to the NUMA architecture of the system. By specifying the NUMA policy for a process or shared memory, numactl can help minimize latency and increase overall system performance.

numactl Command Examples

1. Run a command on node 0 with memory allocated on node 0 and 1:

# numactl --cpunodebind=0 --membind=0,1 -- command command_arguments

2. Run a command on CPUs (cores) 0-4 and 8-12 of the current cpuset:

# numactl --physcpubind=+0-4,8-12 -- command command_arguments

3. Run a command with its memory interleaved on all CPUs:

# numactl --interleave=all -- command command_arguments

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to delete LVM volume
  2. lvcreate Command Examples in Linux
  3. dmesg Command Examples in Linux
  4. ebuild Command Examples in Linux
  5. CentOS / RHEL : How to Change the login shell of the user
  6. Understanding MySQL Privileges
  7. How to Copy / Move Files and Directories in Linux with “cp” and “mv” commands
  8. How to Configure rsyslog to Filter/discard Specific IP Address in CentOS/RHEL 6,7
  9. MySQL Fails to Start Using systemctl On systemd Linux Distributions
  10. CentOS / RHEL : How to restore/recover a deleted volume group in LVM

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright