mongodb産品部署建議關閉numa。系統裡面使用numactl --interleave=all去調用程序依舊報錯。
在沒有關閉numa之前,mongod程序會有報錯如下:
# numactl --interleave=all su - mongo -c "numactl --interleave=all mongod --help"
mon sep 26 14:07:01 file i/o errno:29 illegal seek
mon sep 26 14:07:01 ** warning: cannot parse numa_maps
mon sep 26 14:07:01
allowed options:
伺服器是dell r610 48g記憶體,2顆4核 intel(r) xeon(r) cpu e5606。
[root@db-192-168-xxx-xxx ~]# numactl --show
policy: default
preferred node: current
physcpubind: 0 1 2 3 4 5 6 7
cpubind: 0 1
nodebind: 0 1
membind: 0 1
[root@db-192-168-xxx-xxx ~]# numastat
node0 node1
numa_hit 231981 165045
numa_miss 0 0
numa_foreign 0 0
interleave_hit 7424 7300
local_node 227621 159104
other_node 4360 5941
在伺服器的bios裡面設定 node interleaving 改為enabled則安裝對稱記憶體配置時支援記憶體交錯。如果為 disabled(已禁用),系統支援非一體化記憶體體系結構 (numa)(非對稱)記憶體配置。
關閉numa後,mongod不再告警。
cpubind: 0
nodebind: 0
membind: 0
node0
numa_hit 388584
numa_miss 0
numa_foreign 0
interleave_hit 11938
local_node 388584
other_node 0
numactl --interleave=all : bigdatabase arguments run big database with its memory interleaved on all cpus.
【參考】
man numactl