WARNING: You are running on a NUMA machine

身居漏室,心系天下

我们在用mongo连接mongodb服务时,可能会出现这样一个警告信息:WARNING: You are running on a NUMA machine。

要解决这个问题,我们可以这样做:

1.设置zone_reclaim_mode:

  shell> echo 0 > /proc/sys/vm/zone_reclaim_mode

  注:从MongoDB1.9.2开始:MongoDB会在启动时自动设置zone_reclaim_mode。
2. 像下面这样启动mongdb服务:

  numactl --interleave=all mongod [other options]
  
  [other options]是一些启动参数。例如:numactl --interleave=all mongod --config /etc/mongod.conf

  如果提示找不到numactl命令,我们需要先安装它,安装方法:yum install numactl或者sudo yum install numactl.

服务启动后,在客户端我们再用mongo连接,发现已经没有"WARNING: You are running on a NUMA machine"的提示了。

京ICP备14008139号-1