mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user