Skip to content

[DNM] rgw/s3vectors: use runtime worker threads - #73919

Open
yuvalif wants to merge 1 commit into
ceph:mainfrom
yuvalif:wip-yuval-s3vectors-stack-fix
Open

yuvalif wants to merge 1 commit into
ceph:mainfrom
yuvalif:wip-yuval-s3vectors-stack-fix

Conversation

@yuvalif

@yuvalif yuvalif commented Nov 16, 2026

Copy link
Copy Markdown
Contributor
  • remove the run_on_stack calls
  • decrease the asio coroutines stack to 512KB

Assisted-by: claude-code:claude-fable-5-2

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.

* remove the run_on_stack calls
* decrease the asio coroutines stack to 512KB

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-fable-5-2
@yuvalif
yuvalif requested a review from a team as a code owner November 16, 2026 07:15
@yuvalif yuvalif added the DNM label Nov 16, 2026
@github-actions github-actions Bot added the rgw label Nov 16, 2026
@aaltshuler

Copy link
Copy Markdown
Contributor

@yuvalif .gitmodules on this branch now points at yuvalif/lancedb-c (spawn-hop-rework), but the src/rgw/lancedb-c gitlink is still b837f67, the same as main. So the build uses lancedb-c without the worker-thread change, with the lancedb_run_on_stack calls removed and the stacks reduced. Could you bump the gitlink to 59ca9d7?

Have you already run RGW against 59ca9d7 locally? I am building this branch with the gitlink at 59ca9d7 now. I will run the rgw/s3vectors suite and a concurrent stress on it, plus a control at b837f67, and post the results here and on lancedb/lancedb-c#76.

@aaltshuler

Copy link
Copy Markdown
Contributor

@yuvalif I ran this PR in RGW with the lancedb-c pointer moved to 59ca9d7 (lancedb/lancedb-c#76 head), against the PR as pushed (b837f67) and against its base fa9e6b26adf. vstart on aarch64 (Ubuntu 24.04, Debug build), a fresh cluster per variant, the rgw/s3vectors suite plus a concurrent boto3 stress (8 clients, 296 calls per run, 6 runs per variant).

Variant lancedb-c Frontend / background stack Suite Stress radosgw
base fa9e6b26adf b837f67 1 MiB / 1 MiB 117 pass, 1 fail 1,776 / 1,776 up
this PR as pushed b837f67 512 KiB / 256 KiB 117 pass, 1 fail 1,769 / 1,776 up
this PR, pointer at 59ca9d7 59ca9d7 512 KiB / 256 KiB 117 pass, 1 fail 1,767 / 1,776 up
as pushed, both stacks 128 KiB b837f67 128 KiB / 128 KiB all fail not run SIGSEGV on the first CreateVectorBucket
pointer at 59ca9d7, both stacks 128 KiB 59ca9d7 128 KiB / 128 KiB 117 pass, 1 fail 1,764 / 1,776 up

What it shows:

  • With 59ca9d7, RGW passes on 128 KiB coroutine stacks. With b837f67 the same build overflows the frontend coroutine stack in lancedb::connection::execute under block_on (gdb: si_addr == $sp, inside the guard page below the 128 KiB mapping).
  • At this PR's stack sizes the two lancedb-c versions behave the same, so the 512 KiB / 256 KiB runs alone do not tell them apart.

Three things I ran into:

  1. Moving the pointer to 59ca9d7 also changes src/rgw/Cargo.lock: stacker, psm, ar_archive_writer and object drop out. The build runs cargo build without --locked, so it rewrites the tracked file without saying so.
  2. test_lock_timestamp_refresh_during_rebuild fails in every variant, the base included. The longest rebuild of the test index took 1.2 to 2.0 s at up to 80,000 vectors, so no refresh ever came due (Apple M5 Pro VM). This run therefore does not cover lock refresh during a long build.
  3. Every failed stress call is the same, and it is not from this PR: DeleteVectorBucket returns BucketNotEmpty right after DeleteIndex returned 200. In all 37 cases a background index build had started on that index within the previous 2 s (25 logged complete, 12 logged FAILED); in the two I traced request by request, the build started and finished while DeleteIndex was still running. On the leftovers I checked, the index is still listed, ListVectors and QueryVectors on it return 500, and a second DeleteIndex clears it. My default stress did not hit it on the base only because it finished before the builds started; with 12 to 16 rounds it happens there too (9 of 80 client runs). I can file a tracker issue with the timeline.

Not covered: x86, a release build, teuthology, multisite, rgw_s3vector_data_s3_bucket=true, and lancedb_runtime_configure() (this PR does not call it, so #76 ran with its defaults).

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.

2 participants