Red Hat Bugzilla – Bug 1286285
dmstats: allow mapping of files to stats regions
Last modified: 2016-11-04 00:12:25 EDT
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:
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/
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
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