RedHat init script patch: disable transparent hugepage

Arnoud Vermeer arnoud at tumblr.com
Wed Jul 9 15:05:07 CEST 2014


There is an advisement in the documentation about disabling redhat
transparent hugepages. I think this patch would be a nice addition to the
init script.

Arnoud

---
 redhat/varnish.initrc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/redhat/varnish.initrc b/redhat/varnish.initrc
index 0db3ab6..0e7a2e9 100755
--- a/redhat/varnish.initrc
+++ b/redhat/varnish.initrc
@@ -50,6 +50,13 @@ start() {
  fi
  echo -n "Starting Varnish Cache: "

+      if /bin/uname -r | /bin/grep -q el6
+      then
+            # It is recommended to disable transparent hugepages on RHEL6
+            #
https://www.varnish-cache.org/docs/trunk/installation/platformnotes.html
+            echo "never" >
/sys/kernel/mm/redhat_transparent_hugepage/enabled
+      fi
+
  # Open files (usually 1024, which is way too small for varnish)
  ulimit -n ${NFILES:-131072}

--
1.8.5.2 (Apple Git-48)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140709/530c9a39/attachment.html>


More information about the varnish-dev mailing list