25.12. Configuring NUMA policies using systemd


Non-uniform memory access (NUMA) is a computer memory subsystem design, in which the memory access time depends on the physical memory location relative to the processor.

Memory close to the CPU has lower latency (local memory) than memory that is local for a different CPU (foreign memory) or is shared between a set of CPUs.

In terms of the Linux kernel, NUMA policy governs where (for example, on which NUMA nodes) the kernel allocates physical memory pages for the process.

systemd provides unit file options NUMAPolicy and NUMAMask to control memory allocation policies for services.

重要

When you configure a strict NUMA policy, for example bind, make sure that you also appropriately set the CPUAffinity= unit file option.

Procedure

  • Set the NUMA memory policy through the NUMAPolicy unit file option:

    1. Check the values of the NUMAPolicy unit file option in the service of your choice:

      $ systemctl show --property <NUMA policy configuration option> <service name>
    2. As a root, set the required policy type of the NUMAPolicy unit file option:

      # systemctl set-property <service name> NUMAPolicy=<value>
    3. Restart the service to apply the changes:

      # systemctl restart <service name>
  • Set a global NUMAPolicy setting using the [Manager] configuration option:

    1. Search in the /etc/systemd/system.conf file for the NUMAPolicy option in the [Manager] section of the file.
    2. Edit the policy type and save the file.
    3. Reload the systemd configuration:

      # systemd daemon-reload
    4. Reboot the server.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部