[DRBD-user] % of utilisation on my drbd device
Lutz Vieweg
lvml at 5t9.de
Wed Jan 25 20:44:41 CET 2012
On 01/21/2012 04:48 PM, Lars Ellenberg wrote:
>> 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?
Yes, this works for me (applyied to linux-3.2.1).
Regards,
Lutz Vieweg
More information about the drbd-user
mailing list