Bug 1893015 - Storage efficiency card showing wrong compression ratio
Summary: Storage efficiency card showing wrong compression ratio
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Storage Plugin
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.6.z
Assignee: Kanika Murarka
QA Contact: Shay Rozen
URL:
Whiteboard:
Depends On: 1891999
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-29 22:26 UTC by OpenShift BugZilla Robot
Modified: 2020-12-04 21:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-30 16:45:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 7044 0 None closed [release-4.6] Bug 1893015: Fix compression card metrics for Persitent dashboard 2021-01-15 16:41:31 UTC
Red Hat Product Errata RHBA-2020:5115 0 None None None 2020-11-30 16:45:51 UTC

Description OpenShift BugZilla Robot 2020-10-29 22:26:38 UTC
+++ This bug was initially created as a clone of Bug #1891999 +++

Description of problem:
Current storage efficiency card, shows the ratio of `ceph_bluestore_bluestore_compressed_original` and `ceph_bluestore_bluestore_compressed` instead of `ceph_bluestore_bluestore_compressed_original` and `ceph_bluestore_bluestore_compressed_allocated`.`ceph_bluestore_bluestore_compressed` query tells us the new size of the data after compression and not the size required to store the compressed data, as it also depends on min_blob_size of bluestore.

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

How reproducible:
2/2

Steps to Reproduce:
1. Navigate to Storage class creation view
2. Create a compressed pool and a storage class using it.
3. Attach PVC to this storage class and add some data to it.
4. Observe the Storage efficiency card and capacity breakdown card.

Actual results:
The Storage efficiency card will show high amount of efficiency, but the storage saved will be lesser.

Expected results:
Storage saved due to compression should match the ratio from storage efficiency card.

Additional info:

Comment 5 Shay Rozen 2020-11-18 11:25:50 UTC
POOL                                                      ID     STORED      OBJECTS     USED        %USED     MAX AVAIL     QUOTA OBJECTS     QUOTA BYTES     DIRTY     USED COMPR     UNDER COMPR 
    p-rep3comp                                                19      10 GiB       2.63k      22 GiB      3.52       199 GiB     N/A               N/A             2.63k        8.2 GiB          16 GiB 

The ratio shows which is got as we see 16GiB that where compressed into 8.2GiB
But I have a problem with the saving that shows only 5.48 GiB
The client sent 10g which with replica 3 should be 30g and now it is 22g so the saving should like 8G. Also we can see that 16g where comporessed to 8.2g so something is wrong with the saving value. How it is calculated?

Comment 8 Kanika Murarka 2020-11-24 10:12:46 UTC
The query for saving and ratio are same (one gives the ratio and other gives the difference)
ratio: sum(ceph_bluestore_bluestore_compressed_original) / clamp_min(sum(ceph_bluestore_bluestore_compressed_allocated),1)
saved: (sum(ceph_bluestore_bluestore_compressed_original) - sum(ceph_bluestore_bluestore_compressed_allocated))

I will suggest to open a different bug for saving, as this bug is for compression ratio.

Comment 9 Shay Rozen 2020-11-24 10:17:48 UTC
(In reply to Kanika Murarka from comment #8)
> The query for saving and ratio are same (one gives the ratio and other gives
> the difference)
> ratio: sum(ceph_bluestore_bluestore_compressed_original) /
> clamp_min(sum(ceph_bluestore_bluestore_compressed_allocated),1)
> saved: (sum(ceph_bluestore_bluestore_compressed_original) -
> sum(ceph_bluestore_bluestore_compressed_allocated))
> 
> I will suggest to open a different bug for saving, as this bug is for
> compression ratio.
Verifying and will open another BZ for the saving issue

Comment 11 errata-xmlrpc 2020-11-30 16:45:31 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 (OpenShift Container Platform 4.6.6 bug fix update), 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/RHBA-2020:5115


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