appliance: Add sensible disk optimizations.

The timeout lets us read remote images without timing out.

The noop scheduler lets the host do scheduling.  This generally makes
sense for mixed workloads because the host has a global view of the
system, and often has more compute power too.
This commit is contained in:
Richard W.M. Jones
2013-05-29 16:02:26 +01:00
parent da764805ba
commit 1766ff1177

View File

@@ -83,6 +83,12 @@ if grep -sq selinux=1 /proc/cmdline; then
mount -t selinuxfs none /sys/fs/selinux
fi
# Disk optimizations.
# Increase the SCSI timeout so we can read remote images.
for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done
# https://access.redhat.com/site/solutions/5427
for f in /sys/block/[hsv]d*/queue/scheduler; do echo noop > $f; done
# Update the system clock.
hwclock -u -s