ansible-redis icon indicating copy to clipboard operation
ansible-redis copied to clipboard

disable transparent hugepage at boot

Open awr opened this issue 8 years ago • 10 comments

As another version of https://github.com/DavidWittman/ansible-redis/pull/103 which includes updates to init.d

awr avatar Mar 10 '17 04:03 awr

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.

btd avatar Mar 26 '17 19:03 btd

good point @btd . I'll take a stab at pulling it out later this week.

awr avatar Mar 28 '17 21:03 awr

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 avatar Mar 29 '17 05:03 awr

@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

btd avatar Mar 30 '17 08:03 btd

@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

btd avatar Mar 30 '17 09:03 btd

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 avatar Mar 31 '17 02:03 awr

@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.

DavidWittman avatar Apr 16 '17 16:04 DavidWittman

No worries -- yeah, I unfortunately can't. Please fork for me if you're willing!

awr avatar Apr 17 '17 02:04 awr

Are there still plans to merge this PR at some point?

sensei100 avatar Nov 06 '20 17:11 sensei100

Hello, please consider merging this as for many users it will cause Redis to have performance issues...

tanji avatar Dec 05 '22 15:12 tanji