ansible-redis
ansible-redis copied to clipboard
disable transparent hugepage at boot
As another version of https://github.com/DavidWittman/ansible-redis/pull/103 which includes updates to init.d
I think this is 👍 change. Probably in future this could be a separate role, others could reuse it - it looks written in pretty reusable way.
good point @btd . I'll take a stab at pulling it out later this week.
Ok, I've put together https://github.com/NudgeSoftware/ansible-transparent-huge-pages Note that there's also this one: https://github.com/SimpliField/ansible-transparent-huge-pages, which I discovered afterwards ...
@awr, i think you need to add start before in systemd unit files.
In [Unit] section, it is possible to add Before and Wants directives. Also github show strange line endings in your tasks\main.yml.
{% for service in start_before %}
Wants={{ service }}
Before={{ service }}
{% endfor %}
Also can you please add it to galaxy
@awr just fyi, to make it work at ubuntu 16.04, i did small changes:
[Unit]
Description=Disable Transparent Huge Pages
Before=redis-server.service
Wants=redis-server.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c "/bin/echo never > /sys/kernel/mm/transparent_hugepage/enabled"
ExecStart=/bin/sh -c "/bin/echo never > /sys/kernel/mm/transparent_hugepage/defrag"
[Install]
WantedBy=multi-user.target
Thanks for the suggestions @btd -- I've added them in here: https://github.com/NudgeSoftware/ansible-transparent-huge-pages/commit/c8d3e97bbe1a8ad00f36fd8182744314c8ff11ae
As for adding to galaxy, I realized that I'd have to authorize my company's org (which I'm not able to at this time). If you want it on galaxy please feel free to fork it and push it up from your fork.
@awr Sorry for the slow feedback. I think I'm going to implement this as a role dependency, which will require pushing it up to Galaxy. If you haven't got authorization from your org I can fork and take care of that part.
No worries -- yeah, I unfortunately can't. Please fork for me if you're willing!
Are there still plans to merge this PR at some point?
Hello, please consider merging this as for many users it will cause Redis to have performance issues...