A default installation of MongoDB on Ubuntu 18.04 gives the following warning about transparent hugepage defrag. How to deal with it?
Mongo complains because using transparent hugepage and always defraging it is not optimal for it's performance. Do your research if you need more info.
A clean permanent solution is to install sysfs and add the setting there.
:~# apt install sysfsutils
add these two lines to /etc/sysfs.conf:
kernel/mm/transparent_hugepage/enabled = never kernel/mm/transparent_hugepage/defrag = never