And again about THP off persistent setting

Hello all! No doubts that turning off THP is one of strongly recommended prerequisites while installing and configuring MongoDB, but I’d like to discuss the way to do it. According to official documentation the recommended way is to write simple one-shot “pseudo service” which will write required settings to appropriate /proc location. But why not using more convenient way through configuring it in /etc/default/grub settings? I mean transparent_hugepages=never parameter. This option is provided “out of the box” and it’s more proper way from my POV. What do you think folks?

Still there is no anybody from support here? Can you shed some light on question above please?

Hi @Konstantin_Filippov welcome to the community!

Actually you can use any method you deem best to disable transparent huge pages. The method presented in the documentation was tested to work reliably in many cases, but alternative means are equally valid.

The end goal is for the server to not display any startup warning connected to transparent huge pages. If you still see this warning printed in the mongod logs, then the method needs to be revisited.

In fact I would say that there may be better methods to do this depending on your Linux distribution. There may be some ideas in server admin oriented sites such as ServerFault, for example.

Best regards