Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings about NUMA while starting up the container #113

Open
w1ndy opened this issue Sep 20, 2016 · 3 comments
Open

Warnings about NUMA while starting up the container #113

w1ndy opened this issue Sep 20, 2016 · 3 comments
Labels
docs Documentation needed! Request Request for image modification or feature

Comments

@w1ndy
Copy link

w1ndy commented Sep 20, 2016

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.

@w1ndy
Copy link
Author

w1ndy commented Sep 20, 2016

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/

@tianon
Copy link
Member

tianon commented Dec 20, 2017

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

@tianon tianon added the docs Documentation needed! label Apr 24, 2018
@wglambert wglambert added the Request Request for image modification or feature label Apr 24, 2018
@tianon
Copy link
Member

tianon commented Mar 8, 2022

To improve on this, adding --cap-add SYS_NICE to your container arguments is sufficient to allow NUMA to do the right thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation needed! Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

3 participants