mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-11 14:04:17 +00:00
Make NUMA optional
This commit is contained in:
parent
e3b6b7577f
commit
4074743f18
@ -48,6 +48,9 @@ mongodb_manage_systemd_unit: true
|
||||
# Disable transparent hugepages on systemd debian based installations
|
||||
mongodb_disable_transparent_hugepages: false
|
||||
|
||||
# You can enable or disable NUMA support
|
||||
mongodb_use_numa: true
|
||||
|
||||
mongodb_user: "{{ 'mongod' if ('RedHat' == ansible_os_family) else 'mongodb' }}"
|
||||
mongodb_uid:
|
||||
mongodb_gid:
|
||||
|
@ -21,6 +21,8 @@ mongodb_systemd_unit_limit_nproc: 64000
|
||||
|
||||
mongodb_disable_transparent_hugepages: false
|
||||
|
||||
mongodb_use_numa: true
|
||||
|
||||
mongodb_user: "{{ 'mongod' if ('RedHat' == ansible_os_family) else 'mongodb' }}"
|
||||
mongodb_uid:
|
||||
mongodb_gid:
|
||||
|
@ -24,6 +24,7 @@
|
||||
name: numactl
|
||||
state: present
|
||||
lock_timeout: "{{ yum_lock_timeout }}"
|
||||
when: mongodb_use_numa | bool
|
||||
|
||||
- name: Install PyMongo package
|
||||
yum:
|
||||
|
@ -57,6 +57,7 @@
|
||||
apt:
|
||||
name: numactl
|
||||
state: present
|
||||
when: mongodb_use_numa | bool
|
||||
|
||||
- name: Add systemd configuration if present
|
||||
template:
|
||||
|
@ -30,6 +30,7 @@
|
||||
name: numactl
|
||||
state: present
|
||||
lock_timeout: "{{ yum_lock_timeout }}"
|
||||
when: mongodb_use_numa | bool
|
||||
|
||||
- name: Install PyMongo package
|
||||
yum:
|
||||
|
@ -5,7 +5,11 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user