Skip to content

wip, enable user-txn no conflict support - #68691

Closed
Matan-B wants to merge 6 commits into
ceph:mainfrom
Matan-B:wip-matanb-seastore-conflict-stage2
Closed

Matan-B wants to merge 6 commits into
ceph:mainfrom
Matan-B:wip-matanb-seastore-conflict-stage2

Conversation

@Matan-B

@Matan-B Matan-B commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Use the generalized stage_visibility_handoff from:

Originated for Backref tree txns in:

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@Matan-B Matan-B added this to Crimson May 3, 2026
@Matan-B Matan-B moved this to Awaits review in Crimson May 3, 2026
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@Matan-B Matan-B moved this from Awaits review to In Progress in Crimson Jun 1, 2026
@Matan-B

Matan-B commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Closing this.

Based on the per‑shard retry/invalidated stats[1] , conflict rates look reasonable overall (and even quite good in the 4KB run, mostly ~2–8%). There is some skew across shards, but nothing that indicates issues.

Trying to further reduce conflicts/retries would likely come at a cost, such as introducing txn merging on flight (with the additional complexity).

The logical address space change might explain some the reduced conflicts (Will try to verify this and edit).
Given the throughput remains roughly the same with the lower conflict ratio, it's easier to dismiss its impact now than before.

[1] MUTATE txns stats:

Shard Created Committed Invalidated Invalidation %
0 137,624 137,674 3,117 2.26%
1 136,991 137,039 9,504 6.94%
2 135,111 135,159 3,085 2.28%
3 131,528 131,576 4,899 3.73%
4 136,853 136,901 3,659 2.67%
5 132,594 132,642 10,345 7.81%
6 137,620 137,668 10,075 7.32%
7 139,253 139,301 7,924 5.69%

[2] MUTATE txns by extent type (compared to PRE-128bit PR):

Extent Type main No-128bit Addr PR Delta
ONODE_BLOCK_STAGED 31,041 38,035 +6,994
LADDR_INTERNAL 13,046 25,761 +12,715
LADDR_LEAF 7,481 9,587 +2,106
ROOT ~40 29 ~-11
Total 52,608 73,412 +20,804

The laddrt_t PR did reduce the conflict count by almost half (for LADDR extents) 35k to 20k - which is cool.
I think that another reason the conflict count was rather high was due to TRIM_ALLOC / TRIM_DIRTY / CLEANER extent retries - which had a bug where these rewrite txns kept invalidtaing each other. This might better explain earlier investigations where we saw 1.5 retries per txn. This is no longer the case (at least for this workload) where we have ~0.05 retries per txn.

workload: https://gist.github.com/Matan-B/c9d78707a2083532572336fea2a7f7df

@jdurgin @xxhdx1985126

@Matan-B Matan-B closed this Jun 3, 2026
@Matan-B Matan-B moved this from In Progress to Unassigned / Drafts / Discussion in Crimson Jun 3, 2026
@jdurgin

jdurgin commented Jun 4, 2026

Copy link
Copy Markdown
Member

Thanks for the update @Matan-B , that does look like significantly fewer total LBA updates required - do the numbers in your 2nd table represent theo same amount of client operations? Would be curious to normalize by that and compare delta % if they aren't already normalized.

Even 5% conflicts could be very significant depending on the level of latency added - do you have numbers on latency distribution? e.g. do 5% avg conflicts give a spike around 95 percentile latency? how does tail latency compare before / after the LBA addition (and the trim conflict fix)?

@Matan-B

Matan-B commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the update @Matan-B , that does look like significantly fewer total LBA updates required - do the numbers in your 2nd table represent theo same amount of client operations? Would be curious to normalize by that and compare delta % if they aren't already normalized.

Same workload, randwrite 8 rbd images 8qd each with prefill.

Even 5% conflicts could be very significant depending on the level of latency added - do you have numbers on latency distribution? e.g. do 5% avg conflicts give a spike around 95 percentile latency? how does tail latency compare before / after the LBA addition (and the trim conflict fix)?

Interesting, collecting these. We do have the total average:

Shard Invalidations Conflict % Avg Lat (ms)
0 8,650 6.13% 0.92
1 5,576 4.31% 0.45
2 10,086 7.39% 1.54
3 11,890 8.70% 1.52
4 7,380 5.39% 0.81
5 8,046 6.02% 0.75
6 7,337 5.31% 0.64
7 14,447 10.33% 2.55

We can see clearly the relation here between conflict ratio to avg lat. However, no prectiles exits. Working on collecting p90/95 in a followup PR to have better image on tail lat.

edit: we can follow up in #69281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Unassigned / Drafts / Discussion

Development

Successfully merging this pull request may close these issues.

2 participants