将默认numa策略设置为“交错”系统范围

我知道这是可能的numa模式设置为“交错”(见下面注意)为特定的过程使用numactrl --interleave ,但我想知道是否有可能使这个系统范围默认(aka改变“系统政策”)。 例如,如果有一个内核启动标志来实现这个?

注意:在这里我正在讨论在NUMA节点上交叉分配页面的内核行为 – 而不是在交叉caching行的BIOS级别的内存控制器行为设置

如果使用RHEL / CentOS / Fedora,我build议使用numad守护进程。 ( 红帽paywall链接 )。

尽pipe我对numactl --interleave指令没有太多的用处,但似乎您已经确定您的工作负载需要它。 你能解释为什么这是为了提供更好的情况?

编辑:

看起来大多数build议显式numactl定义的应用程序都可以创build一个libnuma库调用,或者将numactl合并到一个包装脚本中 。

对于numad方面,有一个configuration选项,可以在命令行或/etc/numad.conf/etc/numad.conf

 -K <0|1> This option controls whether numad keeps interleaved memory spread across NUMA nodes, or attempts to merge interleaved memory to local NUMA nodes. The default is to merge interleaved memory. This is the appropriate setting to localize processes in a subset of the system's NUMA nodes. If you are running a large, single-instance application that allocates inter- leaved memory because the workload will have continuous unpredictable memory access patterns (eg a large in-memory database), you might get better results by specifying -K 1 to instruct numad to keep interleaved memory distributed. 

有人说,用numad -K 1 -u X (其中X是numad -K 1 -u X核心数) numad -K 1 -u X这件事可能会有所帮助。 尝试一下。

另请参阅惠普在Linux和NUMA上的ProLiant白皮书。