On Wed, Oct 27, 2010 at 01:23:35AM +0200, Michael Monnerie wrote: > On Dienstag, 26. Oktober 2010 Emmanuel Florac wrote: > > echo "noop" > /sys/block/sdc/queue/scheduler > > echo 512 > /sys/block/sdc/queue/nr_requests > > blockdev --setra 4096 /dev/sdc > > How about this small script in /etc/init.d/boot.local? > > for i in /dev/xvd? /dev/sd? ; do > if test "$i" == "${i%\?}" ; then > echo i=$i > blockdev --setra 1024 $i > j=${i#/dev/} > echo j=$j > echo noop >/sys/block/$j/queue/scheduler > echo 512 >/sys/block/$j/queue/nr_requests > fi > done > > This works for VMs within XenServer (/dev/xvda) and real servers > (/dev/sda), and sets some values for all drives. I'd suggest that people learn how to tweak udev hotplug rules so that when the device is first created (i.e. during hotplug) the scheduler, queue depth and readahead are set automatically. That way you don't have to rely on devices being discovered before your script runs... Another benefit of doing it this way is that it is easy to set default rules for different types of devices based on regex matching e.g. different configs for "sd*" vs "dm*" vs "vd*" are trivial to set up. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs