Skip to content

squid: mds: trim mdlog when segments exceed threshold and trim was idle#60838

Merged
mchangir merged 3 commits intoceph:squidfrom
vshankar:wip-68919-squid
Feb 6, 2025
Merged

squid: mds: trim mdlog when segments exceed threshold and trim was idle#60838
mchangir merged 3 commits intoceph:squidfrom
vshankar:wip-68919-squid

Conversation

@vshankar
Copy link
Contributor

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


backport of #60381
parent tracker: https://tracker.ceph.com/issues/66948

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

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 7d11c70)
Credit goes to Patrick (@batrick) for identifying this.

When there are huge number of subtree exports (such as done in export
thrashing test), the MDS would log an EExport event. The EExport event
is relatively large in size. This causes the MDS to log new minor log
segments frequently. Moreover, the MDS logs a major segment (boundary)
after a certain number of events have been logged. This casues large
number of (minor) events to get build up and cause delays in trimming
expired segments, since journal expire position is updated on segment
boundaries.

To mitigate this issue, the MDS now starts a major segment after a
configured number of minor segments have been logged. This threshold
is configurable by adjusting `mds_log_minor_segments_per_major_segment`
MDS config (defaults to 16).

Fixes: https://tracker.ceph.com/issues/66948
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 718afe2)

Conflicts:
    src/common/options/mds.yaml.in

Minor conflict in mds.yaml.in for missing configs in squid release.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit f54be33)
@vshankar vshankar requested a review from a team as a code owner November 26, 2024 05:20
@vshankar vshankar added this to the squid milestone Nov 26, 2024
@vshankar vshankar added the cephfs Ceph File System label Nov 26, 2024
@vshankar
Copy link
Contributor Author

vshankar commented Jan 5, 2025

This PR is under test in https://tracker.ceph.com/issues/69422.

@batrick
Copy link
Member

batrick commented Jan 9, 2025

If you're not set to merge this yet, it'd be nice to include https://tracker.ceph.com/issues/69426#note-3 with this PR.

@vshankar
Copy link
Contributor Author

If you're not set to merge this yet, it'd be nice to include https://tracker.ceph.com/issues/69426#note-3 with this PR.

I'll rebuild the branch with the additional fix.

Copy link
Contributor

@mchangir mchangir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mchangir mchangir merged commit 656977f into ceph:squid Feb 6, 2025
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.

3 participants