]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: fine-grained statistics of logical object space usage
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 21 Sep 2017 05:44:32 +0000 (13:44 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 29 Sep 2017 13:16:19 +0000 (21:16 +0800)
commit421aee3aea959a526ed102035e0ef29ea427f8d8
tree40f3ce9514aa1da178405090503093acbc387744
parentf90bd4b957938c1ce050b3f5783ead37b297ddc2
osd: fine-grained statistics of logical object space usage

To test this change, we create an image of 5GB and do rbd bench write of 1GB:
./bin/rbd create bar -s 5120 && ./bin/rbd bench --io-type write --io-size 32K --io-total 100M --io-pattern rand  rbd/bar

Below is the test result.

Was:

GLOBAL:
    SIZE       AVAIL      RAW USED     %RAW USED
    30911M     27052M        3859M         12.49
POOLS:
    NAME                  ID     USED      %USED     MAX AVAIL     OBJECTS
    rbd                   0      3191M     26.36         8914M        1174
    cephfs_data_a         1          0         0         8914M           0
    cephfs_metadata_a     2       2246         0         8914M          21

Now:

GLOBAL:
    SIZE       AVAIL      RAW USED     %RAW USED
    30911M     27050M        3861M         12.49
POOLS:
    NAME                  ID     USED        %USED     MAX AVAIL     OBJECTS
    rbd                   0      101216k      1.10         8913M        1178
    cephfs_data_a         1            0         0         8913M           0
    cephfs_metadata_a     2          892         0         8913M          21

E.g., this change can make "osd pool set-quota max_bytes" work nicely.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/osd/osd_types.cc
src/osd/osd_types.h
src/osdc/Objecter.h