Bug 1613855 - [RFE] Display space savings when a VDO volume is used.
Summary: [RFE] Display space savings when a VDO volume is used.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhhi
Version: rhhiv-1.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: RHHI-V 1.5
Assignee: Sahina Bose
QA Contact: bipin
URL:
Whiteboard:
Depends On: 1590967
Blocks: 1520833 1548985
TreeView+ depends on / blocked
 
Reported: 2018-08-08 12:25 UTC by Sahina Bose
Modified: 2018-11-08 05:40 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
The space saved by using Virtual Disk Optimization is displayed on the Brick and Volume detail pages of the Cockpit UI.
Clone Of: 1590967
Environment:
Last Closed: 2018-11-08 05:39:29 UTC
Embargoed:


Attachments (Terms of Use)
Verified_UI_Screenshot_Space_Savings (35.33 KB, image/png)
2018-10-22 11:53 UTC, bipin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:3523 0 None None None 2018-11-08 05:40:35 UTC
oVirt gerrit 92738 0 None MERGED gluster: Replaced vdo output parser with PyYAML 2020-04-28 07:40:33 UTC
oVirt gerrit 92739 0 master MERGED gluster: Added savings data to the vdoVolumeList output 2020-04-28 07:40:33 UTC
oVirt gerrit 92767 0 master MERGED gluster: Added support for physical/logical blocks usage 2020-04-28 07:40:33 UTC
oVirt gerrit 92768 0 master MERGED gluster: Implemented brick level savings calculation 2020-04-28 07:40:33 UTC
oVirt gerrit 92769 0 None MERGED gluster: Extracted thin specific calls from GlusterSyncJob 2020-04-28 07:40:33 UTC
oVirt gerrit 92770 0 master MERGED gluster: Added storing brick's savings data. 2020-04-28 07:40:33 UTC
oVirt gerrit 92771 0 master MERGED gluster: Added storing volume's saving data 2020-04-28 07:40:33 UTC
oVirt gerrit 92772 0 master MERGED gluster: Added storing SD savings data 2020-04-28 07:40:33 UTC
oVirt gerrit 92953 0 master MERGED gluster:Added reporting vdo savings at the bricks page 2020-04-28 07:40:34 UTC
oVirt gerrit 92964 0 None MERGED gluster: Extracted thin specific calls from GlusterSyncJob 2020-04-28 07:40:34 UTC
oVirt gerrit 93209 0 master MERGED gluster: Removed redundant int() call 2020-04-28 07:40:34 UTC
oVirt gerrit 93210 0 ovirt-4.2 MERGED gluster: Replaced vdo output parser with PyYAML 2020-04-28 07:40:34 UTC

Description Sahina Bose 2018-08-08 12:25:09 UTC
+++ This bug was initially created as a clone of Bug #1590967 +++

Description of problem:

When a VDO volume is used as a storage domain, the user needs to be presented with the space savings that he/she is getting

Version-Release number of selected component (if applicable):
4.2

How reproducible:
NA

Additional info:
Space savings should be presented at the brick level as well as the gluster volume/storage domain level

--- Additional comment from Denis Chaplygin on 2018-06-14 04:30:17 EDT ---

What should we do in case same VDO volume is used for several storage domains?

What information should we provide in case of (multiple) vdo-thinp layers?

--- Additional comment from Sahina Bose on 2018-06-15 14:22:46 EDT ---

(In reply to Denis Chaplygin from comment #1)
> What should we do in case same VDO volume is used for several storage
> domains?
> 

I think the same space saving can be reported.

> What information should we provide in case of (multiple) vdo-thinp layers?

Adding Dennis for inputs.

--- Additional comment from Dennis Keefe on 2018-06-15 14:39 EDT ---



--- Additional comment from Dennis Keefe on 2018-06-15 18:18:41 EDT ---

Savings for 2.0
Cockpit will display the VDO savings per node. See attachment.

Savings for 2.0+
Storage Domain

Each storage domain should display the storage savings by averaging each
VDO's volume savings on each gluster's volume bricks.

example:
the brick for vmstore on host-rhhi1 (/dev/sdb)
has space savings of 49% (vdo command: vdostats --hum)

the brick for vmstore on host-rhhi2 (/dev/sdb)
has space savings of 57%

the brick for vmstore on host-rhhi3 (/dev/sdb)
has space savings of 87%

(49+57+87)/3 = 64% space savings

64% space savings should be displayed for the storage domain after "Guaranteed Free Space" and before "Description" 
--------------------------------

Savings for 2.0+
Dashboard

The Dashboard could show the savings either in the storage "circle" as part of the ring or just as text in the center of the 
ring.  I would normally say that the savings would be green, but that is used already, so blue might work.  The savings 
here should report the savings for the cluster not just per storage domain.  

The stats can come from either VDO manager by using "vdostats --verbose" 
Command: vdostats --verbose|egrep "logical blocks used|physical blocks used"

  data blocks used                    : 17275885
  logical blocks used                 : 33712693

Or from sysfs

Sysfs does not hold a percent savings, which means you have to calculate it yourself.
 
1. capture the output of /sys/kvdo/<vdo volume name>/statistics/{logical_blocks_used|physical_blocks_used}
2. add the physical blocks used for all volumes in the cluster together
3. add the logical blocks used for all volumes in the cluster together 
4. subtract the total logical blocks used by total physical blocks used (this is the total number of blocks saved by VDO)
5. then divide the total saved blocks by the total logical blocks, multiplied by 100 to get the savings percent


ls /sys/kvdo/vdo_sdb/statistics/|egrep "logical blocks used|physical blocks used"
logical_blocks_used
data_blocks_used

cat $(ls -d /sys/kvdo/*/statistics/*|egrep "logical_blocks_used|data_blocks_used")
33712680
17275871

Math
33712680 - 17275871 = 16436059  (saved blocks)
16436059 / 33712680 = 0.4875 *100 = 48% (savings percentage)
0.4875 *100 = 48%

Comment 4 Dennis Keefe 2018-08-28 17:37:45 UTC
Without discards there will be no accuracy.  Discards is needed to report accurate space used and space savings.

Comment 6 Sahina Bose 2018-10-17 11:50:25 UTC
Please provide doc_text

Comment 7 bipin 2018-10-22 11:53:13 UTC
Tested the bug on rhvm-4.2.7.4. The fix seems to be working as expected.
The space savings is reflecting in the RHV-M corresponding to the CLI output.


[root@rhsqa-abc ~]# vdostats --human-readable
Device                    Size      Used Available Use% Space saving%
/dev/mapper/vdo_sdc     223.1G     60.0G    163.0G  26%           62%
/dev/mapper/vdo_sdd     931.0G      4.2G    926.8G   0%           77%


Attaching the screenshot of the RHV-M

Comment 8 bipin 2018-10-22 11:53:53 UTC
Created attachment 1496373 [details]
Verified_UI_Screenshot_Space_Savings

Comment 9 SATHEESARAN 2018-10-24 09:07:39 UTC
The dependent bug https://bugzilla.redhat.com/show_bug.cgi?id=1590967#c13 has undergone a phase change, where the bug was reopened. Reflecting the status on this bug too

Comment 12 errata-xmlrpc 2018-11-08 05:39:29 UTC
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://access.redhat.com/errata/RHEA-2018:3523


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