MongoDB Tuning: disable transparent huge pages

a fix for Debian/Ubuntu

Dec 22nd 2015almost 3 years ago

Sep 28th 201818 days ago

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 https://gist.githubusercontent.com/justsml/5e8f10892070072c4ffb/raw/disable-transparent-hugepages
sudo chmod 755 /etc/init.d/disable-transparent-hugepages
sudo update-rc.d disable-transparent-hugepages defaults

References:

  1. https://docs.mongodb.org/v3.0/tutorial/transparent-huge-pages/