Recommended limits for for mongod

This commit is contained in:
Paulo Pizarro 2019-04-25 13:57:22 -03:00
parent 2db0da93a9
commit 9f8a1b1348
1 changed files with 18 additions and 2 deletions

View File

@ -5,8 +5,24 @@ Documentation=man:mongod(1)
[Service] [Service]
User=mongodb User=mongodb
ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
LimitNOFILE=65535 # file size
LimitNPROC=65535 LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=64000
# processes/threads
LimitNPROC=64000
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
# Recommended limits for for mongod as specified in
# http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target