Skip to content

rgw/s3vectors: link librgw_lancedb dynamically - #73063

Merged
djgalloway merged 1 commit into
ceph:mainfrom
mheler:wip-rgw-lancedb-link
Oct 30, 2026
Merged

djgalloway merged 1 commit into
ceph:mainfrom
mheler:wip-rgw-lancedb-link

Conversation

@mheler

@mheler mheler commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

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 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.

@mheler mheler changed the title rgw/s3vectors: move lancedb into its own static library rgw/s3vectors: split s3vector out of rgw_common into a static library Oct 25, 2026
@mheler mheler changed the title rgw/s3vectors: split s3vector out of rgw_common into a static library rgw/s3vectors: split s3vector out of rgw_common Oct 25, 2026
@mheler
mheler marked this pull request as ready for review October 25, 2026 08:21
@mheler
mheler requested a review from a team as a code owner October 25, 2026 08:21

@yuvalif yuvalif left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should take a different approach here.
this breaks the way the way that we do both SAL and the frontend handlers.

note that what we need to split is the librgw_lancedb not the s3vectors code.
if this is still not possible, i would take the approach that librgw_lancedb should be dynamically linked instead.

@mheler
mheler force-pushed the wip-rgw-lancedb-link branch from d338dd5 to 5e87576 Compare October 25, 2026 12:39
@mheler
mheler requested a review from a team as a code owner October 25, 2026 12:39
@mheler mheler changed the title rgw/s3vectors: split s3vector out of rgw_common rgw/s3vectors: link librgw_lancedb dynamically Oct 25, 2026
@mheler
mheler requested a review from yuvalif October 25, 2026 12:40
@mheler

mheler commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

we should take a different approach here. this breaks the way the way that we do both SAL and the frontend handlers.

note that what we need to split is the librgw_lancedb not the s3vectors code. if this is still not possible, i would take the approach that librgw_lancedb should be dynamically linked instead.

Thanks. I've taken the approach that librgw_lancedb should be dynamically linked, and pushed that up.

@yuvalif
yuvalif requested a review from cbodley October 25, 2026 14:35
@yuvalif

yuvalif commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

looks like arm64 build is failing due to link issues:

 FAILED: src/rgw/rgw-lancedb-prefix/src/rgw-lancedb-stamp/rgw-lancedb-build lib/librgw_lancedb.so.1 /ceph/build/src/rgw/rgw-lancedb-prefix/src/rgw-lancedb-stamp/rgw-lancedb-build /ceph/build/lib/librgw_lancedb.so.1 

@mheler
mheler force-pushed the wip-rgw-lancedb-link branch from 5e87576 to 68d2083 Compare October 25, 2026 17:14
@tchaikov tchaikov mentioned this pull request Oct 26, 2026
14 tasks
Comment thread debian/librgw2.install Resolved
Comment thread src/rgw/CMakeLists.txt Resolved
rgw_common put the Rust archive on every dependent binary's link line.
The jammy and noble deb builds run out of memory when these links run in
parallel.

Build and package librgw_lancedb as a shared library, then link
rgw_common against it. A link against it only reads its dynamic symbol
table. Drop the aarch64 lld option, since the C++ links no longer carry
the Rust code. Keep the test binary's own provider symbols private so
calls from the test environment resolve inside librgw_lancedb.so.

Assisted-by: Claude Opus 5.5
Signed-off-by: Matthew N. Heler <[email protected]>
@mheler
mheler force-pushed the wip-rgw-lancedb-link branch from 729e4fb to 21621e0 Compare October 26, 2026 23:36

@tchaikov tchaikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test make check

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@tchaikov

Copy link
Copy Markdown
Contributor

@mheler

mheler commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@anrao19

anrao19 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao4-testing-2026-10-28-0754-main.

@djgalloway

Copy link
Copy Markdown
Contributor

jenkins test api

@djgalloway

djgalloway commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

I'm running an arm64 build of this as well: https://jenkins.ceph.com/job/ceph-dev-pipeline/10515/stages/ - PASSED

Package size impact

Installed sizes from the shaman builds (PR head 21621e0f766 vs main 9e49f5cb896):

Package main (centos9) PR (centos9) main (noble) PR (noble)
ceph-common 697 MiB 118 MiB 720 MiB 141 MiB
radosgw 630 MiB 62 MiB 657 MiB 78 MiB
librgw2 327 MiB 278 MiB 329 MiB 282 MiB

teuthology runs

https://pulpito.ceph.com/dgalloway-2026-10-30_14:53:52-rgw:s3vectors-wip-rgw-lancedb-link-distro-default-smithi/ - PASSED

https://pulpito.ceph.com/dgalloway-2026-10-30_14:56:16-rados:encoder-wip-rgw-lancedb-link-distro-default-smithi/ - PASSED

https://pulpito.ceph.com/dgalloway-2026-10-30_16:15:27-dencoder-pkg-wip-rgw-lancedb-link-distro-default-smithi/ - PASSED

arm64 package sizes

arm64 build of the PR head 21621e0f766 (ceph-dev-pipeline #10515, SUCCESS,
1h47m, centos9 + noble + jammy). Installed sizes from the chacra repodata:

Package centos9 main eb81cf09f7 centos9 PR noble PR jammy PR
ceph-common 635 MiB 107 MiB 125 MiB 117 MiB
radosgw 573 MiB 55 MiB 71 MiB 67 MiB
librgw2 298 MiB 253 MiB 262 MiB 258 MiB

Main has no ready arm64 noble or jammy builds on shaman to compare against
(the deb builds have been failing on OOM), so only centos9 has a baseline
there. The x86_64 comparison on the same distros shows the same ratio.

The aarch64 cdylib link succeeded with the default linker, without the
-fuse-ld=lld workaround this PR removes. The el9 aarch64 repodata shows the
same new dependency as x86_64: ceph-common requires
librgw_lancedb.so.1()(64bit), provided by librgw2.

@djgalloway
djgalloway merged commit 7147c7a into ceph:main Oct 30, 2026
19 checks passed
@ivancich

Copy link
Copy Markdown
Member

@mheler @yuvalif : This appears to be causing valgrind errors in teuthology. See: https://qa-proxy.ceph.com/teuthology/anuchaithra-2026-10-29_04:19:23-rgw-wip-anrao4-testing-2026-10-28-0758-main-distro-default-trial/689436/

Specifically, here's the valgrind result: https://qa-proxy.ceph.com/teuthology/anuchaithra-2026-10-29_04:19:23-rgw-wip-anrao4-testing-2026-10-28-0758-main-distro-default-trial/689436/remote/trial097/log/valgrind/

<error>
  <unique>0x9915</unique>
  <tid>1</tid>
  <kind>Leak_PossiblyLost</kind>
  <xwhat>
    <text>2 bytes in 1 blocks are possibly lost in loss record 3 of 831</text>
    <leakedbytes>2</leakedbytes>
    <leakedblocks>1</leakedblocks>
  </xwhat>
  <stack>
    <frame>
      <ip>0x685787E</ip>
      <obj>/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>malloc</fn>
      <dir>/builddir/build/BUILD/valgrind-3.26.0/coregrind/m_replacemalloc</dir>
      <file>vg_replace_malloc.c</file>
      <line>447</line>
    </frame>
    <frame>
      <ip>0x113131A6</ip>
      <obj>/usr/lib64/ceph/librgw_lancedb.so.1</obj>
    </frame>
    <frame>
      <ip>0x112E49F4</ip>
      <obj>/usr/lib64/ceph/librgw_lancedb.so.1</obj>
    </frame>
    <frame>
      <ip>0x10FD0286</ip>
      <obj>/usr/lib64/ceph/librgw_lancedb.so.1</obj>
    </frame>
    <frame>
      <ip>0xA90E6C6</ip>
      <obj>/usr/lib64/ceph/librgw_lancedb.so.1</obj>
    </frame>
    <frame>
      <ip>0xA915293</ip>
      <obj>/usr/lib64/ceph/librgw_lancedb.so.1</obj>
    </frame>
    <frame>
      <ip>0x601954D</ip>
      <obj>/usr/lib64/ld-linux-x86-64.so.2</obj>
      <fn>call_init</fn>
      <dir>/usr/src/debug/glibc-2.39-128.el10_2.x86_64/elf</dir>
      <file>dl-init.c</file>
      <line>74</line>
    </frame>
    <frame>
      <ip>0x601954D</ip>
      <obj>/usr/lib64/ld-linux-x86-64.so.2</obj>
      <fn>call_init</fn>
      <dir>/usr/src/debug/glibc-2.39-128.el10_2.x86_64/elf</dir>
      <file>dl-init.c</file>
      <line>26</line>
    </frame>
    <frame>
      <ip>0x601963B</ip>
      <obj>/usr/lib64/ld-linux-x86-64.so.2</obj>
      <fn>_dl_init</fn>
      <dir>/usr/src/debug/glibc-2.39-128.el10_2.x86_64/elf</dir>
      <file>dl-init.c</file>
      <line>121</line>
    </frame>
    <frame>
      <ip>0x6031BDF</ip>
      <obj>/usr/lib64/ld-linux-x86-64.so.2</obj>
    </frame>

@tchaikov tchaikov added the messenger Issues involving one of the Ceph messenger implementations label Nov 20, 2026
tchaikov added a commit to tchaikov/ceph that referenced this pull request Nov 20, 2026
Without a jobserver, GCC's -flto=auto can start an LTRANS worker per
CPU in each concurrent link. Divide the CPU count by the heavy link
pool size and use the result for automatic LTO links in either pool.
This also applies to Ninja RPM builds on EL9 and EL10. A 192-thread
host with 255 GiB has 29 heavy slots at the existing 4500 MiB budget,
giving six workers per link.

Replace -flto=auto in the C/C++ compile flags, executable, shared and
module linker flags, active configuration flags, and GNU IPO options.
GCC 11 remembers auto even after a later -flto=N. Jammy's GCC 11.4
ran make -j32 for -flto=auto -flto=2 and make -j2 after replacement.
Keep explicit GCC job counts and use -flto-jobs=N for Clang ThinLTO.

After ceph#73063, RGW loads librgw_lancedb.so.1. Peak process-tree PSS
in GiB on GCC 14.2, using the same -O2 -g fat LTO objects, 32 CPUs
and three heavy slots:

  target             auto   N=10
  radosgw            6.61   3.99
  librgw.so          5.86   4.27
  radosgw-admin      5.55   4.18
  denc-mod-rgw.so    6.01   4.24
  ceph-osd           4.77   2.42
  crimson-osd        9.82   6.14

Both radosgw-admin and denc-mod-rgw used a GNU ld archive group in
both runs. The optional Crimson build needed fmt::format_to qualified
with this host's fmt 10 headers. The capped peaks fit the existing
heavy pool allowance of about 9000 MiB per slot.

Signed-off-by: Kefu Chai <[email protected]>
CEPH-BUILD-JOB: ceph-dev-pipeline
DISTROS: jammy noble
ARCHS: x86_64
FLAVORS: default
CI-CONTAINER: false
tchaikov added a commit to tchaikov/ceph that referenced this pull request Nov 20, 2026
Without a jobserver, GCC's -flto=auto can start an LTRANS worker per
CPU in each concurrent link. Divide the CPU count by the heavy link
pool size and use the result for automatic LTO links in either pool.
This also applies to Ninja RPM builds on EL9 and EL10. A 192-thread
host with 255 GiB has 29 heavy slots at the existing 4500 MiB budget,
giving six workers per link.

Replace -flto=auto in the C/C++ compile flags, executable, shared and
module linker flags, active configuration flags, and GNU IPO options.
GCC 11 remembers auto even after a later -flto=N. Jammy's GCC 11.4
ran make -j32 for -flto=auto -flto=2 and make -j2 after replacement.
Keep explicit GCC job counts and use -flto-jobs=N for Clang ThinLTO.

After ceph#73063, RGW loads librgw_lancedb.so.1. Peak process-tree PSS
in GiB on GCC 14.2, using the same -O2 -g fat LTO objects, 32 CPUs
and three heavy slots:

  target             auto   N=10
  radosgw            6.61   3.99
  librgw.so          5.86   4.27
  radosgw-admin      5.55   4.18
  denc-mod-rgw.so    6.01   4.24
  ceph-osd           4.77   2.42
  crimson-osd        9.82   6.14

Both radosgw-admin and denc-mod-rgw used a GNU ld archive group in
both runs. The optional Crimson build needed fmt::format_to qualified
with this host's fmt 10 headers. The capped peaks fit the existing
heavy pool allowance of about 9000 MiB per slot.

Signed-off-by: Kefu Chai <[email protected]>
tchaikov added a commit to tchaikov/ceph that referenced this pull request Nov 21, 2026
Without a jobserver, GCC's -flto=auto can start an LTRANS worker per
CPU in each concurrent link. Divide the CPU count by the heavy link
pool size and use the result for automatic LTO links in either pool.
This also applies to Ninja RPM builds on EL9 and EL10. A 192-thread
host with 255 GiB has 29 heavy slots at the existing 4500 MiB budget,
giving six workers per link.

Replace -flto=auto in the C/C++ compile flags, executable, shared and
module linker flags, active configuration flags, and GNU IPO options.
GCC 11 remembers auto even after a later -flto=N. Jammy's GCC 11.4
ran make -j32 for -flto=auto -flto=2 and make -j2 after replacement.
Keep explicit GCC job counts and use -flto-jobs=N for Clang ThinLTO.

After ceph#73063, RGW loads librgw_lancedb.so.1. Peak process-tree PSS
in GiB on GCC 14.2, using the same -O2 -g fat LTO objects, 32 CPUs
and three heavy slots:

  target             auto   N=10
  radosgw            6.61   3.99
  librgw.so          5.86   4.27
  radosgw-admin      5.55   4.18
  denc-mod-rgw.so    6.01   4.24
  ceph-osd           4.77   2.42
  crimson-osd        9.82   6.14

Both radosgw-admin and denc-mod-rgw used a GNU ld archive group in
both runs. The capped peaks fit the existing heavy pool allowance of
about 9000 MiB per slot.

Signed-off-by: Kefu Chai <[email protected]>
tchaikov added a commit to tchaikov/ceph that referenced this pull request Nov 21, 2026
Without a jobserver, GCC's -flto=auto can start an LTRANS worker per
CPU in each concurrent link. Divide the CPU count by the heavy link
pool size and use the result for automatic LTO links in either pool.
This also applies to Ninja RPM builds on EL9 and EL10. A 192-thread
host with 255 GiB has 29 heavy slots at the existing 4500 MiB budget,
giving six workers per link.

Replace -flto=auto in the C/C++ compile flags, executable, shared and
module linker flags, active configuration flags, and GNU IPO options.
GCC 11 remembers auto even after a later -flto=N. Jammy's GCC 11.4
ran make -j32 for -flto=auto -flto=2 and make -j2 after replacement.
Keep explicit GCC job counts and use -flto-jobs=N for Clang ThinLTO.

After ceph#73063, RGW loads librgw_lancedb.so.1. Peak process-tree PSS
in GiB on GCC 14.2, using the same -O2 -g fat LTO objects, 32 CPUs
and three heavy slots:

  target             auto   N=10
  radosgw            6.61   3.99
  librgw.so          5.86   4.27
  radosgw-admin      5.55   4.18
  denc-mod-rgw.so    6.01   4.24
  ceph-osd           4.77   2.42
  crimson-osd        9.82   6.14

Both radosgw-admin and denc-mod-rgw used a GNU ld archive group in
both runs. The capped peaks fit the existing heavy pool allowance of
about 9000 MiB per slot.

Signed-off-by: Kefu Chai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build/ops documentation messenger Issues involving one of the Ceph messenger implementations needs-qa rgw tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants