Author Topic: Finding LVM Slow?  (Read 7265 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1420
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Finding LVM Slow?
« 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 ..  :)

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1420
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Re: Finding LVM Slow?
« Reply #1 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