Bug 1286285 - dmstats: allow mapping of files to stats regions
dmstats: allow mapping of files to stats regions
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Bryn M. Reeves
cluster-qe@redhat.com
Milan Navratil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-27 13:26 EST by Bryn M. Reeves
Modified: 2016-11-04 00:12 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Release Note
Doc Text:
*dmstats* now supports mapping of files to `dmstats` regions The "--filemap" option of the "dmstats" command now allows the user to easily configure *dmstats* regions to track I/O operations to a specified file in the file system. Previously, I/O statistics were only available for a whole device, or a region of a device, which limited administrator insight into I/O performance to a per-file basis. Now, the "--filemap" option enables the user to inspect file I/O performance using the same tools used for any *device-mapper* device.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 00:12:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryn M. Reeves 2015-11-27 13:26:53 EST
Description of problem:
Add the ability to automatically create dmstats regions that correspond to the ranges of sectors used by file system objects (initially just files but potentially also directories, journals and other regions of interest to performance analysis).

This is currently possible through the use of external scripts that map the object's extents to sector ranges passed to 'dmstats create' via the --start and --length argument, e.g. dms-filemap.py:

  http://fpaste.org/295215/64862414/

Integrate this into the dmstats tool so that e.g.:

# dmstats create --filemap /path/to/some/file

Will automatically create appropriate regions on the device containing some/file.

Version-Release number of selected component (if applicable):
lvm2-2.02.127-*.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. dmstats create --filemap /path/to/some/file

Actual results:
# dmstats create --filemap /path/to/some/file
dmstats: unrecognized option '--filemap'
Couldn't process command line.

Expected results:
# dmstats create --filemap /path/to/some/file
vg_hex-lv_home: Created new region with 1 area(s) as region ID 2
[...]

Additional info:
Comment 2 Bryn M. Reeves 2016-07-08 04:29:58 EDT
The functionality for this bug is now complete (although still awaiting review & merge upstream):

https://git.fedorahosted.org/cgit/lvm2.git/log/?h=dev-bmr-dmstats-filemap

Once the infrastructure for creating and managing groups (bug 1282563) was complete the work to add this additional feature turned out to be less than anticipated.

Some rough documentation on the feature:

  https://paste.fedoraproject.org/388858/66582146/
Comment 6 Corey Marthaler 2016-09-23 14:37:54 EDT
Verified that file maps can be created and monitored as I/O is running to those files.

lvm2-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
lvm2-libs-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
lvm2-cluster-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-libs-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-event-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-event-libs-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016




[root@host-118 ~]# dmstats list --group
Name             GrpID RgID ObjType RgStart RgSize  #Areas ArSize  ProgID
host-118_load        0    0 group     9.00m 977.00k      1 977.00k dmstats
 
  
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 7.00     0 2.86m 418.50k  0.27 13.80 39.14    0.00   39.14
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 0.00     0     0       0  0.00  0.00  0.00    0.00    0.00
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s   AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 3.00     0 977.00k 325.50k  0.01  0.70  4.67    0.00    4.67
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 0.00     0     0       0  0.00  0.00  0.00    0.00    0.00
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 0.00     0     0       0  0.00  0.00  0.00    0.00    0.00
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 0.00     0     0       0  0.00  0.00  0.00    0.00    0.00
[root@host-118 ~]# dmstats report --group
Name             GrpID RgID ObjType ArID ArStart ArSize  RMrg/s WMrg/s R/s  W/s  RSz/s WSz/s   AvgRqSz QSize Util% AWait RdAWait WrAWait
host-118_load        0    0 group      0   9.00m 977.00k   0.00   0.00 0.00 3.00     0 977.00k 325.50k  0.01  0.60  3.67    0.00    3.67
Comment 8 errata-xmlrpc 2016-11-04 00:12:25 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1445.html

Note You need to log in before you can comment on or make changes to this bug.