crowbar/crowbar-openstack

View on GitHub
chef/cookbooks/nova/templates/default/crowbar-compute-set-sys-options.erb

Summary

Maintainability
Test Coverage
#!/bin/sh
#
# Configured via Crowbar Nova barclamp proposal. Do not edit directly.

if test -w /sys/kernel/mm/ksm/run; then
    echo <%= @ksm_enabled %> > /sys/kernel/mm/ksm/run
    echo 0 > /sys/kernel/mm/ksm/merge_across_nodes
fi

if test -w /sys/kernel/mm/transparent_hugepage/enabled; then
    echo <%= @transparent_hugepage_enabled %> > /sys/kernel/mm/transparent_hugepage/enabled
fi

if test -w /sys/kernel/mm/transparent_hugepage/defrag; then
    echo <%= @transparent_hugepage_defrag %> > /sys/kernel/mm/transparent_hugepage/defrag
fi

find /sys/block -type l -name 'sd*' -exec sh -c 'echo deadline > {}/queue/scheduler' \;