Repository navigation
rgw/s3vectors: define RadosVectorBucket's destructor out of line - #73088
Conversation
RadosVectorBucket's inline destructor is copied into every rgw file that deletes a Bucket, and each copy needs RadosStore, so even small rgw binaries end up linking most of rgw_common. Define it out of line like RadosBucket's destructor, so it no longer gets copied. Assisted-by: Claude Opus 5.5 Signed-off-by: Matthew N. Heler <[email protected]>
tchaikov
left a comment
There was a problem hiding this comment.
lgtm.
I built the same tree with and without this change under LTO (-g -O2 -flto=auto -ffat-lto-objects, lancedb ON, 32 threads). About half of the RGW tests and tools stop pulling in the Rust code. For example:
| target | peak link PSS | link time |
|---|---|---|
| rgw-policy-check | 5.5 -> 0.8 GiB | 79 -> 6 s |
| radosgw-es | 5.3 -> 0.8 GiB | 77 -> 6 s |
| ceph_test_rgw_redis_driver | 5.4 -> 0.9 GiB | 82 -> 7 s |
Across the lancedb targets that linked in both builds, links peaking above 4 GiB went from 31 to 15, total peak PSS from 170 to 106 GiB, and total link time from 2595 to 1586 s. radosgw, radosgw-admin, librgw.so and denc-mod-rgw.so still carry it, since they use the rados SAL, so this and #73063 complement each other.
but i am afraid that this alone won't fix jammy: its gcc 12.3 has PR lto/114655, so each remaining RGW link still runs an LTRANS job per thread there. but with half as many heavy links, the burst is less likely to run out of memory.
Define RadosVectorBucket's destructor out of line, like RadosBucket's. Since #72180 made RadosVectorBucket a subclass of RadosBucket, its inline destructor gets copied into every rgw file that deletes a Bucket, and each copy pulls RadosStore, and with it most of rgw_common, into rgw tests and tools that only need a small part of it.
Fixes: https://tracker.ceph.com/issues/82052
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.