File tree Expand file tree Collapse file tree 6 files changed +12
-0
lines changed Expand file tree Collapse file tree 6 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ mongodb_manage_systemd_unit: true
48
48
# Disable transparent hugepages on systemd debian based installations
49
49
mongodb_disable_transparent_hugepages : false
50
50
51
+ # You can enable or disable NUMA support
52
+ mongodb_use_numa : true
53
+
51
54
mongodb_user : " {{ 'mongod' if ('RedHat' == ansible_os_family) else 'mongodb' }}"
52
55
mongodb_uid :
53
56
mongodb_gid :
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ mongodb_systemd_unit_limit_nproc: 64000
21
21
22
22
mongodb_disable_transparent_hugepages : false
23
23
24
+ mongodb_use_numa : true
25
+
24
26
mongodb_user : " {{ 'mongod' if ('RedHat' == ansible_os_family) else 'mongodb' }}"
25
27
mongodb_uid :
26
28
mongodb_gid :
Original file line number Diff line number Diff line change 24
24
name : numactl
25
25
state : present
26
26
lock_timeout : " {{ yum_lock_timeout }}"
27
+ when : mongodb_use_numa | bool
27
28
28
29
- name : Install PyMongo package
29
30
yum :
Original file line number Diff line number Diff line change 57
57
apt :
58
58
name : numactl
59
59
state : present
60
+ when : mongodb_use_numa | bool
60
61
61
62
- name : Add systemd configuration if present
62
63
template :
Original file line number Diff line number Diff line change 30
30
name : numactl
31
31
state : present
32
32
lock_timeout : " {{ yum_lock_timeout }}"
33
+ when : mongodb_use_numa | bool
33
34
34
35
- name : Install PyMongo package
35
36
yum :
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ Documentation=man:mongod(1)
5
5
6
6
[Service]
7
7
User={{ mongodb_user }}
8
+ {% if mongodb_use_numa | bool %}
8
9
ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
10
+ {% else %}
11
+ ExecStart=/usr/bin/mongod --config /etc/mongod.conf
12
+ {% endif %}
9
13
# file size
10
14
LimitFSIZE=infinity
11
15
# cpu time
You can’t perform that action at this time.
0 commit comments