mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-11 22:14:15 +00:00
34 lines
843 B
Django/Jinja
34 lines
843 B
Django/Jinja
# {{ ansible_managed }}
|
|
[Unit]
|
|
Description=An object/document-oriented database
|
|
Documentation=man:mongod(1)
|
|
|
|
[Service]
|
|
User={{ mongodb_user }}
|
|
{% if mongodb_use_numa | bool %}
|
|
ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
|
|
{% else %}
|
|
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
|
|
{% endif %}
|
|
# file size
|
|
LimitFSIZE=infinity
|
|
# cpu time
|
|
LimitCPU=infinity
|
|
# virtual memory size
|
|
LimitAS=infinity
|
|
# open files
|
|
LimitNOFILE={{ mongodb_systemd_unit_limit_nofile }}
|
|
# processes/threads
|
|
LimitNPROC={{ mongodb_systemd_unit_limit_nproc }}
|
|
# 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]
|
|
WantedBy=multi-user.target
|