integ/devtools
Daniel Badea 763f3ccf0e Fix drbd slow before swact
Slow image to volume conversion performance on AIO-DX before first
swact is caused by DRBD device using small I/O block size (4k)
coupled with qemu-img using O_DIRECT (command line option '-t none')

Block size is determined by backing disk and peer capabilities.
Before peer connection is established DRBD assumes a 'safe' block
size of 4k and because lvm is configured on top this size is
also used by devices created by dev-mapper (volumes, etc.). When
the peer comes up the device stack (lvm, drbd, disk) is already
in use and the 4k limit is not updated.

When peers swap primary/secondary roles then device stacks are
created using negotiated I/O block size limits based on peer's
backing disk capabilities so the 4k 'safe' block size is no
longer used.

'drbdmeta' manual page recommends:

  If you will use the resource before it is connected to its peer for
  the first time DRBD may perform better if you use the
  --peer-max-bio-size option. For DRBD versions of the peer use up to
  these values: <8.3.7 -> 4k, 8.3.8 -> 32k, 8.3.9 -> 128k, 8.4.0 ->
  1M.

Setting --peer-max-bio-size to 128k fixes the performance issue.

Story: 2002866
Task: 22815

Change-Id: If562f6931db23c2ffdfade775f5e5fdf5ebce506
Signed-off-by: Don Penney <don.penney@windriver.com>
Signed-off-by: Jack Ding <jack.ding@windriver.com>
2018-07-23 10:36:20 -04:00
..
2018-07-23 10:36:20 -04:00
2018-06-28 15:25:31 -05:00
2018-06-18 11:21:42 -05:00
2018-05-31 07:36:35 -07:00