-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 5954 - Disable Transparent Huge Pages v2 #5964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks LGTM
Let's see which option is preferred
My concern here is we are addressing the symptom not the problem. I think if we disable THP then we'll likely never turn it back on again, and we could be losing out on benefits. Shouldn't we pursue a fix to the underlying issue? |
I understand your concern. I think that the underlying issue is that THP is not applicable to certain workloads, where data access patterns are not contiguous, with a lot of small allocations and deallocations. Every optimization is a tradeoff and comes with a cost. THP can reduce page faults, but in our case it also causes memory fragmentation, CPU spikes ( |
Okay, lets disable it then. |
@Firstyear, thanks! @tbordaz, any thoughts on the healthcheck part? Do you think it's still needed? |
IIUC, with the patch the server requests to disable THP for itself. So the benefit of healthcheck would be to double check that the request was successful. I think it worthes doing that check if it is not too complex to implement. |
I've added healthcheck linter and tests for it, please review. |
Newly added test failed, investigating. |
I fixed the test, now it passes. @tbordaz, please let me know if you're happy with the healthcheck changes, thanks. |
Yes that looks perfect to me |
Bug Description: THP can have negative effects on DS performance when large caches are used. Fix Description: * Add a new variable for `ns-slapd` THP_DISABLE. When THP_DISABLE is set to 1, THP is disabled for `ns-slapd` process via `prctl(2)`. With any other value, THP settings are untouched. Before: ``` $ grep THP /proc/$(pidof ns-slapd)/status THP_enabled: 1 ``` After ``` $ grep THP /proc/$(pidof ns-slapd)/status THP_enabled: 0 ``` * Add a new healthcheck linter, that checks if THP is disabled system-wide or per instance. In case THP is enabled for both the system and the process, it prints recommendations how to disable THP. Fixes: #5954 Reviewed-by: @tbordaz, @Firstyear, @droideck (Thank you all!)
Bug Description:
THP can have negative effects on DS performance when large caches are
used.
Fix Description:
ns-slapd
THP_DISABLE.When THP_DISABLE is set to 1, THP is disabled for
ns-slapd
processvia
prctl(2)
. With any other value, THP settings are untouched.Before:
After
or per instance. In case THP is enabled for both the system and the
process, it prints recommendations how to disable THP.
Fixes: #5954
Reviewed-by: ???