The Linux Community Forum

The Forums => Linux Tips & Tricks => Topic started by: Mad Penguin on August 18, 2010, 06:40:48 pm

Title: Finding LVM Slow?
Post by: Mad Penguin on August 18, 2010, 06:40:48 pm
There is a bug / feature in LVM whereby it sets it's default 'readahead' to 512 regards of the underlying medium. This means with fast disks / arrays you can easily end up getting between a half and a tenth of your potential performance!

How to fix;

Quote
lvchange -r <new size> /dev/<vg>/<lv>

New size is typically going to bg 4096 and up.

Try;

Quote
blockdev --report

To see what the read-ahead is on the underlying block device (i.e. whatever your VG is sitting on) and use that as an initial value. I just managed to pump the throughput in one of my arrays (for LVM's) from 120Mb/sec to 579Mb/sec ..  :)
Title: Re: Finding LVM Slow?
Post by: Mad Penguin on August 19, 2010, 10:54:54 am
And if you're using DRBD on top of LVM, make sure you add;

Quote
use-bmbv;

To your disk section(s) otherwise you won't see any of the benefits of this additional speed .. :)
SimplePortal 2.3.3 © 2008-2010, SimplePortal