2019-11-25 10:44:36 +00:00
|
|
|
# {{ ansible_managed }}
|
2019-05-27 19:00:59 +00:00
|
|
|
[Unit]
|
|
|
|
Description="Disable Transparent Hugepage before MongoDB boots"
|
|
|
|
#WARN: check service name on your system
|
|
|
|
# If you are using MongoDB Cloud, service name is "mongodb-mms-automation-agent.service"
|
2019-11-25 10:44:36 +00:00
|
|
|
Before={{ mongodb_daemon_name }}.service
|
2019-05-27 19:00:59 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
ExecStart=-/bin/bash -c 'echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled'
|
|
|
|
ExecStart=-/bin/bash -c 'echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag'
|
|
|
|
ExecStart=-/bin/bash -c 'echo 0 > /sys/kernel/mm/redhat_transparent_hugepage/khugepaged/defrag'
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
#WARN: check service name on your system
|
|
|
|
# If you are using MongoDB Cloud, service name is "mongodb-mms-automation-agent.service"
|
2019-11-25 10:44:36 +00:00
|
|
|
RequiredBy={{ mongodb_daemon_name }}.service
|