1
0
Fork 0

- Added a first set of profiles. Still need more work

- Fixed several issues with the tuned-adm tool, should work now
This commit is contained in:
Philip Knirsch 2009-08-04 17:33:20 +02:00
parent 733402af8b
commit 37bb0358b7
25 changed files with 686 additions and 0 deletions

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=""

View file

@ -0,0 +1 @@
# ktune sysctl

View file

@ -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

View file

@ -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

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}*/queue/scheduler"

View file

@ -0,0 +1 @@
# ktune sysctl

View file

@ -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

View file

@ -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

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}*/queue/scheduler"

View file

@ -0,0 +1 @@
# ktune sysctl settings

View file

@ -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

View file

@ -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

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}*/queue/scheduler"

View file

@ -0,0 +1,4 @@
# ktune sysctl settings
vm.laptop_mode=5
vm.dirty_writeback_centisecs=1500
kernel.nmi_watchdog=0

View file

@ -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

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}*/queue/scheduler"

View file

@ -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

View file

@ -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

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}*/queue/scheduler"

View file

@ -0,0 +1 @@
# ktune sysctl settings

View file

@ -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

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}*/queue/scheduler"

View file

@ -0,0 +1 @@
# ktune sysctl settings

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}*/queue/scheduler"

View file

@ -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