Bug 1189089

Summary: Provide I/O statistics in lvm2
Product: Red Hat Enterprise Linux 7 Reporter: Bryn M. Reeves <bmr>
Component: lvm2Assignee: Bryn M. Reeves <bmr>
lvm2 sub component: Displaying and Reporting QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact: Steven J. Levine <slevine>
Severity: medium    
Priority: high CC: agk, cmarthal, coughlan, crenshaw, djansa, dwysocha, ghelleks, heinzm, jbrassow, joe.thornber, msnitzer, nperic, prajnoha, riek, tao, zkabelac
Version: 7.1Keywords: FutureFeature, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 294721 Environment:
Last Closed: 2019-09-30 14:28:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1222101    
Bug Blocks:    

Description Bryn M. Reeves 2015-02-04 12:25:31 UTC
+++ This bug was initially created as a clone of Bug #294721 +++
+++ This bug was initially created as a clone of Bug #249706 +++

The kernel has supported stats counters for bio-based device-mapper devices since ~v3.11:
 
commit fd2ed4d252701d3bbed4cd3e3d267ad469bb832a
Author: Mikulas Patocka <mpatocka>
Date:   Fri Aug 16 10:54:23 2013 -0400

    dm: add statistics support

Although it's possible to create and manage stats regions by hand with dmsetup this is cumbersome and gives a poor user experience.

Integrate stats support into libdevmapper and lvm2 tools to expose the device-mapper features in a readily usable fashion.

--- Additional comment from Bryn M. Reeves on 2014-12-18 12:39:02 EST ---

Looking at the LVM1 implementations of lvmsar and lvmsadc they are quite simple; lvmsadc records a timestamp then for each LV a summary line with the name and allocated extent count followed by a table (in LE order) of per-LE read/write IO counters. As with sysstat sadc this is expected to be run from a cron job to build up a series of periodic samples.

The lvmsar command then takes this raw data and formats it into human-readable output.

I'm not sure it makes sense to provide direct equivalents of this in LVM2; the dm-statistics support is considerably more flexible and complete (richer set of event counters and greater control for specifying regions of a device to be monitored).

Since lvmsadc/lvmsar have not been available since RHEL3 it seems unlikely that anyone is relying on the specific output formats they provide.

Anyway: the initial plan is to extend device-mapper reporting to be able to report stats values and to then make use of this from the LVM2 reporting tools. Once we have something working here we can consider whether other compatibility formats (beyond iostat) are worthwhile.

Comment 2 Jonathan Earl Brassow 2019-09-30 14:28:25 UTC
we are going to continue  to let users use dmstats directly.