Skip to content

quincy: mon, osd: Add snaptrim stats to the existing PG stats.#45524

Merged
yuriw merged 2 commits intoceph:quincyfrom
sseshasa:wip-54612-quincy
Mar 24, 2022
Merged

quincy: mon, osd: Add snaptrim stats to the existing PG stats.#45524
yuriw merged 2 commits intoceph:quincyfrom
sseshasa:wip-54612-quincy

Conversation

@sseshasa
Copy link
Copy Markdown
Contributor

backport tracker: https://tracker.ceph.com/issues/54612


backport of #45392
parent tracker: https://tracker.ceph.com/issues/54565

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh

Add a new column, OBJECTS_TRIMMED, to the pg dump stats that shows the
number of objects trimmed when a snap is removed.

When a pg splits, the stats from the parent pg is copied to the child
pg. In such a case, reset objects_trimmed to 0 for the child pg
(see PeeringState::split_into()). Otherwise, this will result in incorrect
stats to be shown for a child pg after the split operation.

Tests:
 - Librados C and C++ API tests to verify the number of objects trimmed
   during snaptrim operation. These tests use the self-managed snaps APIs.
 - Standalone tests to verify objects trimmed using rados pool snaps.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit 00249dc)
Add the snaptrim duration to the json formatted output of the pg dump
stats. Define methods for a PG to set the snaptrim begin time and then to
calculate the total time spent to trim all the objects for the snaps in
the snap_trimq for the PG.

Tests:
  - Librados C and C++ API tests to verify the time spent for a snaptrim
    operation on a PG. These tests use the self-managed snaps APIs.
  - Standalone tests to verify snaptrim duration using rados pool snaps.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit a86ead9)
@yuriw yuriw merged commit 9657b8d into ceph:quincy Mar 24, 2022
@sseshasa sseshasa deleted the wip-54612-quincy branch August 9, 2022 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants