diff --git a/integration/scripts/files/elements/fedora-mongodb/install.d/10-mongodb b/integration/scripts/files/elements/fedora-mongodb/install.d/10-mongodb index 3b53a18b6c..02ea953565 100755 --- a/integration/scripts/files/elements/fedora-mongodb/install.d/10-mongodb +++ b/integration/scripts/files/elements/fedora-mongodb/install.d/10-mongodb @@ -7,6 +7,8 @@ set -e set -o xtrace cat > "/etc/rc.local" << _EOF_ +#!/bin/bash + # Make sure to disable Linux kernel feature transparent huge pages, # it will affect greatly both memory usage and latency in a negative way. # See: http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/ diff --git a/integration/scripts/files/elements/fedora-postgresql/install.d/10-postgresql b/integration/scripts/files/elements/fedora-postgresql/install.d/10-postgresql index a2ee463390..8e225b4f60 100755 --- a/integration/scripts/files/elements/fedora-postgresql/install.d/10-postgresql +++ b/integration/scripts/files/elements/fedora-postgresql/install.d/10-postgresql @@ -14,6 +14,8 @@ vm.overcommit_memory=0 _EOF_ cat > "/etc/rc.local" << _EOF_ +#!/bin/bash + # See 'http://www.postgresql.org/docs/9.3/static/kernel-resources.html' # Disable Linux kernel transparent huge pages. This feature is not supported by # by Postgres 9.3 and may negatively impact performance of the database. diff --git a/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql b/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql index d5b5f50509..09776b1a26 100755 --- a/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql +++ b/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql @@ -17,6 +17,8 @@ vm.nr_hugepages=64 _EOF_ cat > "/etc/rc.local" << _EOF_ +#!/bin/bash + # See 'http://www.postgresql.org/docs/9.4/static/kernel-resources.html' # Postgres 9.4 added support for THP. Using huge pages reduces overhead when # using large contiguous chunks of memory, like PostgreSQL does. diff --git a/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis b/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis index f9ab9a0a00..b3ff956992 100755 --- a/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis +++ b/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis @@ -21,6 +21,8 @@ net.core.somaxconn=1024 _EOF_ cat > "/etc/rc.local" << _EOF_ +#!/bin/bash + # Make sure to disable Linux kernel feature transparent huge pages, # it will affect greatly both memory usage and latency in a negative way. if test -f /sys/kernel/mm/transparent_hugepage/defrag; then diff --git a/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica b/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica index bd2b72aca6..2af428349e 100755 --- a/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica +++ b/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica @@ -41,6 +41,8 @@ TMPDIR=/tmp JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 make cd cat > "/etc/rc.local" << _EOF_ +#!/bin/bash + # Vertica requires THP to be turned off if test -f /sys/kernel/mm/transparent_hugepage/defrag; then echo never > /sys/kernel/mm/transparent_hugepage/defrag