NGnius / PowerTools

Moved to
https://git.ngni.us/NG-SD-Plugins/PowerTools
GNU General Public License v3.0
414 stars 29 forks source link

Add Transparent Hugepages option #58

Closed eth-p closed 1 year ago

eth-p commented 1 year ago

This commit adds the ability for PowerTools to change the kernel transparent hugepages setting.

I gave the backend the ability to change between never, madvise, and always, but only gave the frontend the option to toggle between always and madvise. While this might seem like an odd choice, the kernel docs mention that never is "mostly used for debugging purposes". With madvise as the "off" option, it requires processes to explicitly opt in to THP support via syscalls. Presumably these processes would know how to use it properly, and would be negatively affected by turning THP off entirely.

Known Issues:

Future Considerations:

NGnius commented 1 year ago

Thanks for the hard work on this! Unfortunately this isn't power-related so I don't think PowerTools is the best fit for THP.

SystemToolbox has support for this, in case you're looking for a plugin that can do this.

Happy Holidays!