xfs
[Top] [All Lists]

Re: Pid: 8345, comm: rsync Not tainted 2.6.32.22intel #1

To: Michael Monnerie <michael.monnerie@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Pid: 8345, comm: rsync Not tainted 2.6.32.22intel #1
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 14:55:48 +1100
Cc: xfs@xxxxxxxxxxx, Stefan Priebe - Profihost AG <s.priebe@xxxxxxxxxxxx>
In-reply-to: <201010270124.44846@xxxxxx>
References: <4CC67450.9020602@xxxxxxxxxxxx> <4CC6B56B.7020007@xxxxxxxxxxxx> <20101026132505.6af29d5d@xxxxxxxxxxxxxxxxxxxx> <201010270124.44846@xxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
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

<Prev in Thread] Current Thread [Next in Thread>