Last active
October 11, 2016 11:12
-
-
Save jaynzr/8e012d8ca0b38973f6ba610fb1665adf to your computer and use it in GitHub Desktop.
Fix /sys/kernel/mm/transparent_hugepage/defrag is 'always' warning
For Bitnami Mongodb on debian 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
thp_path=/sys/kernel/mm/transparent_hugepage | |
cat > /opt/bitnami/scripts/disable_hugepage << EOL | |
#!/bin/sh | |
if test -f ${thp_path}/enabled; then | |
echo never > ${thp_path}/enabled | |
fi | |
if test -f ${thp_path}/defrag; then | |
echo never > ${thp_path}/defrag | |
fi | |
if test -f ${thp_path}/khugepaged/defrag; then | |
echo 0 > ${thp_path}/khugepaged/defrag | |
fi | |
EOL | |
chmod +x /opt/bitnami/scripts/disable_hugepage | |
ln -s /opt/bitnami/scripts/disable_hugepage /opt/bitnami/var/init/pre-start/011_disable_hugepage | |
service bitnami restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment