Closed noelmcloughlin closed 3 years ago
Thanks for taking a look at this.
Unfortunately, I don't think this commit solves the problem. This file is on sysfs, The command changes the state rather than creating it, and the current state is marked in its contents with square brackets:
always madvise [never]
So the test would be something like:
- unless: grep -q '[never]' /sys/kernel/mm/transparent_hugepage/enabled
i checked https://redis.io/topics/latency and you are correct.
We can assume Redis formula should enforce never
.
I'll update the commit.
The ideal solution is probably to create a service file (https://docs.mongodb.com/manual/tutorial/transparent-huge-pages) but you could open separate issue for that and someone will get around to it sometime.
$ echo never >/tmp/dave
$ grep -ir '^never' /tmp/dave
never
$ echo $?
0
$ echo always >/tmp/dave
$ grep -ir '^never' /tmp/dave
$ echo $?
1
# echo never >/sys/kernel/mm/transparent_hugepage/enabled
# grep -ir '^never' /sys/kernel/mm/transparent_hugepage/enabled
# echo $?
1
# echo always >/sys/kernel/mm/transparent_hugepage/enabled
# grep -ir '^never' /sys/kernel/mm/transparent_hugepage/enabled
# echo $?
1
:tada: This PR is included in version 0.27.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
89
Describe the changes you're proposing
Enable hugepages only when needed, not everytime
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context