diff --git a/tune-profiles/default/ktune.sysconfig b/tune-profiles/default/ktune.sysconfig new file mode 100644 index 0000000..9529911 --- /dev/null +++ b/tune-profiles/default/ktune.sysconfig @@ -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="" diff --git a/tune-profiles/default/sysctl.ktune b/tune-profiles/default/sysctl.ktune new file mode 100644 index 0000000..9474bba --- /dev/null +++ b/tune-profiles/default/sysctl.ktune @@ -0,0 +1 @@ +# ktune sysctl diff --git a/tune-profiles/default/tuned.conf b/tune-profiles/default/tuned.conf new file mode 100644 index 0000000..9e76868 --- /dev/null +++ b/tune-profiles/default/tuned.conf @@ -0,0 +1,57 @@ +# +# tuned configuration main service +# + +[main] +# Interval for monitoring and tuning. Default is 10s. +# interval=10 + +# +# Disk monitoring section +# +[DiskMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Disk tuning section +# +[DiskTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False +# hdparm=False +# alpm=False + +# +# Net monitoring section +# +[NetMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Net tuning section +# +[NetTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +enabled=False + +# +# CPU monitoring section +# +[CPUMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# CPU tuning section +# +[CPUTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False diff --git a/tune-profiles/desktop-powersave/ktune.sh b/tune-profiles/desktop-powersave/ktune.sh new file mode 100644 index 0000000..67f5ce6 --- /dev/null +++ b/tune-profiles/desktop-powersave/ktune.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +ALPM="medium_power" + +# Set ALPM for all host adapters that support it +for x in /sys/bus/scsi/devices/host*/scsi_host/host*/; do + hotplug="0" + if [ -e $x/sata_hotplug ]; then + hotplug="$(cat $x/sata_hotplug)" + fi + if [ "$hotplug" == "0" -a -e $x/link_power_management_policy ]; then + echo $ALPM > $x/link_power_management_policy + fi +done diff --git a/tune-profiles/desktop-powersave/ktune.sysconfig b/tune-profiles/desktop-powersave/ktune.sysconfig new file mode 100644 index 0000000..1534bc7 --- /dev/null +++ b/tune-profiles/desktop-powersave/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/desktop-powersave/sysctl.ktune b/tune-profiles/desktop-powersave/sysctl.ktune new file mode 100644 index 0000000..9474bba --- /dev/null +++ b/tune-profiles/desktop-powersave/sysctl.ktune @@ -0,0 +1 @@ +# ktune sysctl diff --git a/tune-profiles/desktop-powersave/tuned.conf b/tune-profiles/desktop-powersave/tuned.conf new file mode 100644 index 0000000..9e76868 --- /dev/null +++ b/tune-profiles/desktop-powersave/tuned.conf @@ -0,0 +1,57 @@ +# +# tuned configuration main service +# + +[main] +# Interval for monitoring and tuning. Default is 10s. +# interval=10 + +# +# Disk monitoring section +# +[DiskMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Disk tuning section +# +[DiskTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False +# hdparm=False +# alpm=False + +# +# Net monitoring section +# +[NetMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Net tuning section +# +[NetTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +enabled=False + +# +# CPU monitoring section +# +[CPUMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# CPU tuning section +# +[CPUTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False diff --git a/tune-profiles/laptop-ac-powersave/ktune.sh b/tune-profiles/laptop-ac-powersave/ktune.sh new file mode 100644 index 0000000..67f5ce6 --- /dev/null +++ b/tune-profiles/laptop-ac-powersave/ktune.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +ALPM="medium_power" + +# Set ALPM for all host adapters that support it +for x in /sys/bus/scsi/devices/host*/scsi_host/host*/; do + hotplug="0" + if [ -e $x/sata_hotplug ]; then + hotplug="$(cat $x/sata_hotplug)" + fi + if [ "$hotplug" == "0" -a -e $x/link_power_management_policy ]; then + echo $ALPM > $x/link_power_management_policy + fi +done diff --git a/tune-profiles/laptop-ac-powersave/ktune.sysconfig b/tune-profiles/laptop-ac-powersave/ktune.sysconfig new file mode 100644 index 0000000..1534bc7 --- /dev/null +++ b/tune-profiles/laptop-ac-powersave/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/laptop-ac-powersave/sysctl.ktune b/tune-profiles/laptop-ac-powersave/sysctl.ktune new file mode 100644 index 0000000..152a95a --- /dev/null +++ b/tune-profiles/laptop-ac-powersave/sysctl.ktune @@ -0,0 +1 @@ +# ktune sysctl settings diff --git a/tune-profiles/laptop-ac-powersave/tuned.conf b/tune-profiles/laptop-ac-powersave/tuned.conf new file mode 100644 index 0000000..9e76868 --- /dev/null +++ b/tune-profiles/laptop-ac-powersave/tuned.conf @@ -0,0 +1,57 @@ +# +# tuned configuration main service +# + +[main] +# Interval for monitoring and tuning. Default is 10s. +# interval=10 + +# +# Disk monitoring section +# +[DiskMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Disk tuning section +# +[DiskTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False +# hdparm=False +# alpm=False + +# +# Net monitoring section +# +[NetMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Net tuning section +# +[NetTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +enabled=False + +# +# CPU monitoring section +# +[CPUMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# CPU tuning section +# +[CPUTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False diff --git a/tune-profiles/laptop-battery-powersave/ktune.sh b/tune-profiles/laptop-battery-powersave/ktune.sh new file mode 100644 index 0000000..096ab24 --- /dev/null +++ b/tune-profiles/laptop-battery-powersave/ktune.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +ALPM="min_power" + +# Set ALPM for all host adapters that support it +for x in /sys/bus/scsi/devices/host*/scsi_host/host*/; do + hotplug="0" + if [ -e $x/sata_hotplug ]; then + hotplug="$(cat $x/sata_hotplug)" + fi + if [ "$hotplug" == "0" -a -e $x/link_power_management_policy ]; then + echo $ALPM > $x/link_power_management_policy + fi +done + +# Enables USB autosuspend for all devices +for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done + +# Enables multi core power savings for low wakeup systems +[ -e /sys/devices/system/cpu/sched_mc_power_savings ] && echo 1 > /sys/devices/system/cpu/sched_mc_power_savings + +# Enable ondemand governor (best for powersaving) +[ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ] && echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + +# Enable AC97 audio power saving +[ -e /sys/module/snd_ac97_codec/parameters/power_save ] && echo Y > /sys/module/snd_ac97_codec/parameters/power_save + +# Disable HAL polling of CDROMS +for i in /dev/scd*; do hal-disable-polling --device $i; done + +# Enable power saving mode for Wi-Fi cards +for i in /sys/bus/pci/devices/*/power_level ; do echo 5 > $i ; done diff --git a/tune-profiles/laptop-battery-powersave/ktune.sysconfig b/tune-profiles/laptop-battery-powersave/ktune.sysconfig new file mode 100644 index 0000000..1534bc7 --- /dev/null +++ b/tune-profiles/laptop-battery-powersave/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/laptop-battery-powersave/sysctl.ktune b/tune-profiles/laptop-battery-powersave/sysctl.ktune new file mode 100644 index 0000000..b67041c --- /dev/null +++ b/tune-profiles/laptop-battery-powersave/sysctl.ktune @@ -0,0 +1,4 @@ +# ktune sysctl settings +vm.laptop_mode=5 +vm.dirty_writeback_centisecs=1500 +kernel.nmi_watchdog=0 diff --git a/tune-profiles/laptop-battery-powersave/tuned.conf b/tune-profiles/laptop-battery-powersave/tuned.conf new file mode 100644 index 0000000..9e76868 --- /dev/null +++ b/tune-profiles/laptop-battery-powersave/tuned.conf @@ -0,0 +1,57 @@ +# +# tuned configuration main service +# + +[main] +# Interval for monitoring and tuning. Default is 10s. +# interval=10 + +# +# Disk monitoring section +# +[DiskMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Disk tuning section +# +[DiskTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False +# hdparm=False +# alpm=False + +# +# Net monitoring section +# +[NetMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Net tuning section +# +[NetTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +enabled=False + +# +# CPU monitoring section +# +[CPUMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# CPU tuning section +# +[CPUTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False diff --git a/tune-profiles/latency-performance/ktune.sysconfig b/tune-profiles/latency-performance/ktune.sysconfig new file mode 100644 index 0000000..a49512b --- /dev/null +++ b/tune-profiles/latency-performance/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/latency-performance/sysctl.ktune b/tune-profiles/latency-performance/sysctl.ktune new file mode 100644 index 0000000..080fd31 --- /dev/null +++ b/tune-profiles/latency-performance/sysctl.ktune @@ -0,0 +1,51 @@ +# ktune sysctl settings for EL 5 servers + +# 256 KB default performs well experimentally, and is often recommended by ISVs. +net.core.rmem_default = 262144 +net.core.wmem_default = 262144 + +# When opening a high-bandwidth connection while the receiving end is under +# memory pressure, disk I/O may be necessary to free memory for the socket, +# making disk latency the effective latency for the bandwidth-delay product +# initially. For 10 Gb ethernet and SCSI, the BDP is about 5 MB. Allow 8 MB +# to account for overhead, to ensure that new sockets can saturate the medium +# quickly. +net.core.rmem_max = 8388608 +net.core.wmem_max = 8388608 + +# Allow a deep backlog for 10 Gb and bonded Gb ethernet connections +net.core.netdev_max_backlog = 10000 + +# Always have one page available, plus an extra for overhead, to ensure TCP NFS +# pageout doesn't stall under memory pressure. Default to max unscaled window, +# plus overhead for rmem, since most LAN sockets won't need to scale. +net.ipv4.tcp_rmem = 8192 87380 8388608 +net.ipv4.tcp_wmem = 8192 65536 8388608 + +# Always have enough memory available on a UDP socket for an 8k NFS request, +# plus overhead, to prevent NFS stalling under memory pressure. 16k is still +# low enough that memory fragmentation is unlikely to cause problems. +net.ipv4.udp_rmem_min = 16384 +net.ipv4.udp_wmem_min = 16384 + +# Ensure there's enough memory to actually allocate those massive buffers to a +# socket. +net.ipv4.tcp_mem = 8388608 12582912 16777216 +net.ipv4.udp_mem = 8388608 12582912 16777216 + +# 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. +vm.dirty_ratio = 50 + +# Ensure there's always some easily-dropped pagecache if the system is under +# memory pressure from cached files, since it's much faster to page back in than +# swap. +# Doesn't exist for 2.6.30++ anymore +# vm.pagecache = 90 diff --git a/tune-profiles/server-powersave/ktune.sh b/tune-profiles/server-powersave/ktune.sh new file mode 100644 index 0000000..67f5ce6 --- /dev/null +++ b/tune-profiles/server-powersave/ktune.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +ALPM="medium_power" + +# Set ALPM for all host adapters that support it +for x in /sys/bus/scsi/devices/host*/scsi_host/host*/; do + hotplug="0" + if [ -e $x/sata_hotplug ]; then + hotplug="$(cat $x/sata_hotplug)" + fi + if [ "$hotplug" == "0" -a -e $x/link_power_management_policy ]; then + echo $ALPM > $x/link_power_management_policy + fi +done diff --git a/tune-profiles/server-powersave/ktune.sysconfig b/tune-profiles/server-powersave/ktune.sysconfig new file mode 100644 index 0000000..1534bc7 --- /dev/null +++ b/tune-profiles/server-powersave/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/server-powersave/sysctl.ktune b/tune-profiles/server-powersave/sysctl.ktune new file mode 100644 index 0000000..152a95a --- /dev/null +++ b/tune-profiles/server-powersave/sysctl.ktune @@ -0,0 +1 @@ +# ktune sysctl settings diff --git a/tune-profiles/server-powersave/tuned.conf b/tune-profiles/server-powersave/tuned.conf new file mode 100644 index 0000000..9e76868 --- /dev/null +++ b/tune-profiles/server-powersave/tuned.conf @@ -0,0 +1,57 @@ +# +# tuned configuration main service +# + +[main] +# Interval for monitoring and tuning. Default is 10s. +# interval=10 + +# +# Disk monitoring section +# +[DiskMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Disk tuning section +# +[DiskTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False +# hdparm=False +# alpm=False + +# +# Net monitoring section +# +[NetMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# Net tuning section +# +[NetTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +enabled=False + +# +# CPU monitoring section +# +[CPUMonitor] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False + +# +# CPU tuning section +# +[CPUTuning] +# Enabled or disable the plugin. Default is True. Any other value +# disables it. +# enabled=False diff --git a/tune-profiles/throughput-performance/ktune.sysconfig b/tune-profiles/throughput-performance/ktune.sysconfig new file mode 100644 index 0000000..a49512b --- /dev/null +++ b/tune-profiles/throughput-performance/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/throughput-performance/sysctl.ktune b/tune-profiles/throughput-performance/sysctl.ktune new file mode 100644 index 0000000..152a95a --- /dev/null +++ b/tune-profiles/throughput-performance/sysctl.ktune @@ -0,0 +1 @@ +# ktune sysctl settings diff --git a/tune-profiles/throughput/ktune.sysconfig b/tune-profiles/throughput/ktune.sysconfig new file mode 100644 index 0000000..a49512b --- /dev/null +++ b/tune-profiles/throughput/ktune.sysconfig @@ -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}*/queue/scheduler" diff --git a/tune-profiles/throughput/sysctl.ktune b/tune-profiles/throughput/sysctl.ktune new file mode 100644 index 0000000..080fd31 --- /dev/null +++ b/tune-profiles/throughput/sysctl.ktune @@ -0,0 +1,51 @@ +# ktune sysctl settings for EL 5 servers + +# 256 KB default performs well experimentally, and is often recommended by ISVs. +net.core.rmem_default = 262144 +net.core.wmem_default = 262144 + +# When opening a high-bandwidth connection while the receiving end is under +# memory pressure, disk I/O may be necessary to free memory for the socket, +# making disk latency the effective latency for the bandwidth-delay product +# initially. For 10 Gb ethernet and SCSI, the BDP is about 5 MB. Allow 8 MB +# to account for overhead, to ensure that new sockets can saturate the medium +# quickly. +net.core.rmem_max = 8388608 +net.core.wmem_max = 8388608 + +# Allow a deep backlog for 10 Gb and bonded Gb ethernet connections +net.core.netdev_max_backlog = 10000 + +# Always have one page available, plus an extra for overhead, to ensure TCP NFS +# pageout doesn't stall under memory pressure. Default to max unscaled window, +# plus overhead for rmem, since most LAN sockets won't need to scale. +net.ipv4.tcp_rmem = 8192 87380 8388608 +net.ipv4.tcp_wmem = 8192 65536 8388608 + +# Always have enough memory available on a UDP socket for an 8k NFS request, +# plus overhead, to prevent NFS stalling under memory pressure. 16k is still +# low enough that memory fragmentation is unlikely to cause problems. +net.ipv4.udp_rmem_min = 16384 +net.ipv4.udp_wmem_min = 16384 + +# Ensure there's enough memory to actually allocate those massive buffers to a +# socket. +net.ipv4.tcp_mem = 8388608 12582912 16777216 +net.ipv4.udp_mem = 8388608 12582912 16777216 + +# 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. +vm.dirty_ratio = 50 + +# Ensure there's always some easily-dropped pagecache if the system is under +# memory pressure from cached files, since it's much faster to page back in than +# swap. +# Doesn't exist for 2.6.30++ anymore +# vm.pagecache = 90