MongoDB Tuning: disable transparent huge pages

a fix for Debian/Ubuntu

published over 3 years agoDec 22nd, 2015

updated 6 months agoSep 28th, 2018

disable-transparent-hugepages fix for Debian/Ubuntu

credit: victor-garcia-645096-unsplash.jpg

Are you getting “WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always’.” ?

Run the following commands to quickly do what MongoDB describes at greater length.

# Currently just debian
sudo curl -sSL -o /etc/init.d/disable-transparent-hugepages
sudo chmod 755 /etc/init.d/disable-transparent-hugepages
sudo update-rc.d disable-transparent-hugepages defaults



Unless otherwise noted, all content is copyright Dan Levy 2014-1019.