1
0
Fork 0

add virtual-guest profile

This commit is contained in:
Jan Vcelak 2012-01-11 12:48:19 +01:00
parent 8bd483a47c
commit 8bb2e57c52
4 changed files with 130 additions and 0 deletions

View file

@ -0,0 +1,41 @@
#!/bin/sh
. /etc/tune-profiles/functions
start() {
set_cpu_governor performance
# set_disk_scheduler_quantum 10
enable_transparent_hugepages
# Find non-root and non-boot partitions, disable barriers on them
rootvol=$(df -h / | grep "^/dev" | awk '{print $1}')
bootvol=$(df -h /boot | grep "^/dev" | awk '{print $1}')
volumes=$(df -hl --exclude=tmpfs | grep "^/dev" | awk '{print $1}')
nobarriervols=$(echo "$volumes" | grep -v $rootvol | grep -v $bootvol)
remount_partitions nobarrier $nobarriervols
multiply_disk_readahead 4
return 0
}
stop() {
restore_cpu_governor
# restore_disk_scheduler_quantum
restore_transparent_hugepages
# Find non-root and non-boot partitions, re-enable barriers
rootvol=$(df -h / | grep "^/dev" | awk '{print $1}')
bootvol=$(df -h /boot | grep "^/dev" | awk '{print $1}')
volumes=$(df -hl --exclude=tmpfs | grep "^/dev" | awk '{print $1}')
nobarriervols=$(echo "$volumes" | grep -v $rootvol | grep -v $bootvol)
remount_partitions barrier $nobarriervols
multiply_disk_readahead 0.25
return 0
}
process $@

View file

@ -0,0 +1,27 @@
# ktune service configuration
# This is the ktune sysctl file. You can comment this out to prevent ktune
# from applying its sysctl settings.
#SYSCTL="/etc/sysctl.ktune"
# Use *.conf files in the ktune configuration directory /etc/ktune.d.
# Value: yes|no, default: yes
# It is useful if you want to load settings from additional files. Set this to
# no if you to prevent ktune from using these additional files.
USE_KTUNE_D="yes"
# This is the custom sysctl configuration file. Any settings in this file will
# be applied after the ktune settings, overriding them. Comment this out to
# use only the ktune settings.
SYSCTL_POST="/etc/sysctl.conf"
# This is the I/O scheduler ktune will use. This will *not* override anything
# explicitly set on the kernel command line, nor will it change the scheduler
# for any block device that is using a non-default scheduler when ktune starts.
# You should probably leave this on "deadline", but "as", "cfq", and "noop" are
# also legal values. Comment this out to prevent ktune from changing I/O
# scheduler settings.
ELEVATOR="deadline"
# These are the devices, that should be tuned with the ELEVATOR
ELEVATOR_TUNE_DEVS="/sys/block/{sd,cciss,dm-,vd}*/queue/scheduler"

View file

@ -0,0 +1,41 @@
# ktune sysctl settings for rhel6 servers with enterprise-class
# storage, maximizing i/o throughput
#
# Minimal preemption granularity for CPU-bound tasks:
# (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds)
kernel.sched_min_granularity_ns = 10000000
# SCHED_OTHER wake-up granularity.
# (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds)
#
# This option delays the preemption effects of decoupled workloads
# and reduces their over-scheduling. Synchronous workloads will still
# have immediate wakeup/sleep latencies.
kernel.sched_wakeup_granularity_ns = 15000000
# Filesystem I/O is usually much more efficient than swapping, so try to keep
# swapping low. It's usually safe to go even lower than this on systems with
# server-grade storage.
vm.swappiness = 30
# If a workload mostly uses anonymous memory and it hits this limit, the entire
# working set is buffered for I/O, and any more write buffering would require
# swapping, so it's time to throttle writes until I/O can catch up. Workloads
# that mostly use file mappings may be able to use even higher values.
#
# The generator of dirty data starts writeback at this percentage (system default
# is 20%)
vm.dirty_ratio = 40
# Start background writeback (via writeback threads) at this percentage (system
# default is 10%)
#vm.dirty_background_ratio = 15
# PID allocation wrap value. When the kernel's next PID value
# reaches this value, it wraps back to a minimum PID value.
# PIDs of value pid_max or larger are not allocated.
#
# A suggested value for pid_max is 1024 * <# of cpu cores/threads in system>
# e.g., a box with 32 cpus, the default of 32768 is reasonable, for 64 cpus,
# 65536, for 4096 cpus, 4194304 (which is the upper limit possible).
#kernel.pid_max = 65536

View file

@ -0,0 +1,21 @@
# disable tuned
[main]
[DiskMonitor]
enabled=False
[DiskTuning]
enabled=False
[NetMonitor]
enabled=False
[NetTuning]
enabled=False
[CPUMonitor]
enabled=False
[CPUTuning]
enabled=False