Mongo: Warnings about NUMA while starting up the container

Created on 20 Sep 2016  路  2Comments  路  Source: docker-library/mongo

Hi,

I'm running the mongo image on a NUMA-enabled machine, and I get following warning from logs when MongoDB is starting:

WARNING: You are running on a NUMA machine.
We suggest launching mongod like this to avoid performance problems:
numactl --interleave=all mongod [other options]

How can I resolve this? Any help is appreciated, thanks.

Request docs

Most helpful comment

Seccomp is preventing numactl from working correctly, because get_mempolicy and set_mempolicy syscall is restricted in docker containers. Possible workarounds include:

  1. Run without seccomp: docker run --security-opt seccomp=unconfined mongo
  2. Run with a custom seccomp profile: docker run --security-opt seccomp=./seccomp.json mongo

Hope it helps other people who ran into the same problem. Maybe we can add it into docs? For reference: https://docs.docker.com/engine/security/seccomp/

All 2 comments

Seccomp is preventing numactl from working correctly, because get_mempolicy and set_mempolicy syscall is restricted in docker containers. Possible workarounds include:

  1. Run without seccomp: docker run --security-opt seccomp=unconfined mongo
  2. Run with a custom seccomp profile: docker run --security-opt seccomp=./seccomp.json mongo

Hope it helps other people who ran into the same problem. Maybe we can add it into docs? For reference: https://docs.docker.com/engine/security/seccomp/

Indeed, adding this to the documentation (https://github.com/docker-library/docs/tree/master/mongo) would be extremely appreciated.

Our current test already includes something like this (creating a custom seccomp profile on the fly): https://github.com/docker-library/official-images/blob/98d3a4d3cecc8b53e0ea547337eeff53ff58710e/test/tests/mongo-basics/run.sh#L6-L53

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imaia picture imaia  路  6Comments

wayneiny picture wayneiny  路  4Comments

SimonTulettIdeaco picture SimonTulettIdeaco  路  6Comments

vito-c picture vito-c  路  4Comments

ltdev22 picture ltdev22  路  4Comments