Show Table of Contents
A.14. numad
numad 是一个自动 NUMA 关联管理后台程序。为了动态提高 NUMA 资源分配和管理,它在系统内监控 NUMA 的拓扑结构和资源使用。
注意启用 numad 时 ,其行为将替代默认的自动 NUMA 平衡的行为。
A.14.1. 在命令行使用 numad
将 numad 作为执行表使用,只需运行:
# numad
numad 运行的时候,其活动被记录在
/var/log/numad.log。它会持续运行直到被以下命令终止:
# numad -i 0
终止 numad 不会移除它所做的提高 NUMA 关联的变更。如果系统使用有显著的变化,再次运行 numad 能调整关联来提高新条件下的性能。
如需将 numad 管理限制为特定进程,用下列选项来启动它:
# numad -S 0 -p pid
- -p pid
- 该选项将指定的 pid 添加到显式的包含列表中。当指定的进程达到 numad 进程的显著门限值,指定的进程才会被管理。
- -S 0
- 它将进程扫描的类型设置为
0,这会将 numad 管理限制到显式包含的进程。
有关可用的 numad 选项的详细信息,参见numad手册页:
$ man numad
A.14.2. 作为一个服务来使用 numad
将 numad 作为服务运行时,它尝试基于当前系统的工作负载来动态调整系统。其活动记录在
/var/log/numad.log。
如需启动服务,运行:
# systemctl start numad.service
如需重启后服务持久,运行:
# chkconfig numad on
有关可用的 numad 选项的详细信息,参见numad手册页:
$ man numad
A.14.3. 预安排建议
numad 提供多任务管理系统能够查询的预安排建议服务,从而为进程提供 CPU 的初始绑定和内存资源的协助。无论 numad 是否作为可执行或服务来运行,该预安排建议均可用。
A.14.4. 使用带 KSM 的 numad
如果 KSM 在 NUMA 系统中有所使用,为避免跨 NUMA 节点合并页,把
/sys/kernel/mm/ksm/merge_nodes 参数值改为 0。否则,由于跨 NUMA 节点页合并,KSM 会增加远程内存接入。此外,在大量的跨 NUMA 节点页合并后,内核的内存会计统计会最终否定彼此。因此,KSM 后台程序合并了很多内存页后,numad 会对可用内存正确数量和位置产生困惑。只有过度使用系统内存时,KSM 是有益的。如果系统有足够的空闲内存,可关闭或禁用 KSM 后台程序以提高性能表现。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.