[DRBD-user] % of utilisation on my drbd device

Lars Ellenberg lars.ellenberg at linbit.com
Sat Jan 21 16:48:46 CET 2012

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Fri, Jan 20, 2012 at 08:40:02PM +0100, Lutz Vieweg wrote:
> On 01/19/2012 02:17 PM, Andreas Kurz wrote:
> >>I don't understand why my drbd device is at 100 %util.
> >
> >So think you should get higher write??
> 
> I think he's just wondering why the drbd device reports
> near 100% utilization while the underlying physical device
> seems much less utilized.
> 
> I've been wondering about that for a long time, too.
> But I found that the "utilization" (as reported by iostat)
> for drbd devices is rather meaningless, it will be near 100%
> no matter if there is little or lots of data going through,
> and that does not mean it is actually "maxed out".
> 
> So I decided to just disregard it and only look at the
> utilization of the underlying physical devices.
> 
> Yet, it would be nice if the "utilization percentage" reported
> for drbd device was meaningful.

Thanks for the reminder...
besides these stats not being very useful for "virtual" block devices
that do not have any queue anyways, it looks like our stats for
utilization are broken for kernels > 2.6.27, because we are missing a
simple call to part_round_stats(), like so:

diff --git a/drbd/drbd_req.c b/drbd/drbd_req.c
index 8defe64..0a9bc92 100644
--- a/drbd/drbd_req.c
+++ b/drbd/drbd_req.c
@@ -58,6 +58,7 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
 	mdev->vdisk->in_flight++;
 #else
 	cpu = part_stat_lock();
+	part_round_stats(cpu, &mdev->vdisk->part0);
 	part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
 	part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
 	part_inc_in_flight(&mdev->vdisk->part0, rw);


Does it look more useful now?

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.



More information about the drbd-user mailing list