[linux-lvm] Performance of striping
tkb
tkb9 at roadrunner.com
Mon May 19 23:17:04 UTC 2008
Hans-Joachim Baader wrote:
> Hi,
>
>
>
>>>
snip
>> Have you tried fiddling with read ahead ?
>> "blockdev --setra ..." on the striped LV.
>>
>
> read ahead is currently 256 on all devices. Thanks for the hint.
> I will try some other values. Any Idea what is recommended?
>
I originally found this script to test read ahead settings on some email
list - I forget where or who.
#!/bin/bash
RAW_DEVS="/dev/sdb /dev/sdc /dev/sdd /dev/sde"
MD_DEVS=/dev/md17
LV_DEVS=/dev/mapper/vg17-home
LV_RAS="128 256 1024 4096 8192"
MD_RAS="128 256 1024 4096 8192"
RAW_RAS="128 256 1024 4096 8192"
log=/tmp/ra_test.log
rm -f $log
function show_ra()
{
for i in $RAW_DEVS $MD_DEVS $LV_DEVS
do echo -n "$i `blockdev --getra $i` :: " | tee $log
echo "" | tee -a $log
done
}
function set_ra()
{
RA=$1
shift
for dev in $@
do
blockdev --setra $RA $dev
done
}
function show_performance()
{
COUNT=4000000
/usr/bin/time dd if=$LV_DEVS of=/dev/null count=$COUNT 2>&1 | tee -a $log
echo "<><><>" | tee -a $log
}
for RAW_RA in $RAW_RAS
do
set_ra $RAW_RA $RAW_DEVS
for MD_RA in $MD_RAS
do
set_ra $MD_RA $MD_DEVS
for LV_RA in $LV_RAS
do
set_ra $LV_RA $LV_DEVS
show_ra
show_performance
done
done
done
More information about the linux-lvm
mailing list