GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LSM_VECTOR: at 10M the rebuild after an admitted one is deferred again, because the estimate keeps the old graph resident (#7184 follow-up) · Issue #7260 · ArcadeData/arcadedb

LSM_VECTOR: at 10M the rebuild after an admitted one is deferred again, because the estimate keeps the old graph resident (#7184 follow-up) #7260

New issue
Copy link
New issue
Copy link
Closed
#9289
Closed
LSM_VECTOR: at 10M the rebuild after an admitted one is deferred again, because the estimate keeps the old graph resident (#7184 follow-up)#7260
#9289
Copy link
Assignees
lvca
Labels
bugperformanceseverity:minorCosmetic, documentation, edge case, or a workaround existsvectorVector index and embedding search
Milestone
26.10.2

Description

@tae898
tae898
opened on Sep 8, 2026
Issue body actions

Follow-up to #7184 (fixed in #7191 for the admission reading). Filing it on its own rather than leaving it as a comment on the closed thread, because it is a different, narrower behaviour: the first rebuild is now admitted, the next one is not.

What happens

Main at 9010582b79, embedded, DEEP-10M (10,000,000 vectors, 64-d), 24 GB heap, taskset -c 0-11, the same probe as #7184 with the harness waiting for the admitted rebuild to finish. The query-side trigger fires at the 100,000-mutation step and the rebuild is admitted (asyncRebuildInProgress=1 from 100k through 2.5M). It completes with 10,100,000 graph nodes, so it absorbed the first 100k mutations. By then the probe had buffered 2.4M more, and the next rebuild, for 12,497,000 nodes, is deferred:

Deferring the graph rebuild of vector index V_0_14927148912994: it needs about 13121 MB (12497000 nodes, plus the old graph resident) ...

With the old graph kept resident, a rebuild at this size cannot fit the rebuildMaxHeapPercent allowance of a 24 GB heap, and from there the buffer only grows: every query pays the linear delta scan, 38.7 ms with 2.4M buffered against 2.3 ms clean.

buffered p50 ms (bounded, 9010582) rebuild
0 2.313
10,000 0.679
100,000 3.132 admitted, running
500,000 21.802 running
1,000,000 42.312 running
2,500,000 88.147 running
after that rebuild (2.4M still buffered) 38.748 next one deferred for memory

Rows and the engine's stderr lines: https://github.com/humemai/mmdbbench/tree/6d493be6da87d19be64c533d2de0a427378527cc/experiments/evidence/verify_9010582b79

Why it is narrower than #7184

#7184 was the admission reading being wrong (inflated by the page cache, stale by one GC); #7191 fixed that and the numbers above confirm it: the first rebuild is admitted on a heap where before every attempt was deferred. What remains is the estimate itself being honest: a rebuild is priced as the new graph plus the old one resident, so past roughly 10% of the corpus buffered on a heap of about 2x the graph, no rebuild can be admitted and the delta scan is unbounded again.

What it takes to hit it, and what avoids it

The probe wrote 2.4M vectors during the ~40 minutes the first rebuild ran, about 1,000 inserts/s sustained on a 10M index, which is an adversarial rate. Three things avoid it without engine changes: a heap of about 2x the graph (the deferred rebuild wanted 13 GB beside a 10 GB graph, 32 GB admits it); a lower rebuild threshold so each rebuild is small and the buffer never reaches millions (the 100k one was admitted without trouble); a rebuild in a quiet window for batch-loading workloads. Read-mostly and load-then-serve deployments never see it.

What would remove it

Either a rebuild that does not keep the old graph resident (searches reading the old graph from pages while the new one builds, at a latency cost), or an admission path that can fall back to that mode when the resident estimate does not fit, instead of deferring indefinitely. Second best: a WARNING that names the two numbers once per deferral streak rather than per attempt, so an operator sees that the buffer is unbounded and can raise the heap or force an off-peak rebuild.

A JUnit repro needs the scale (the estimate only exceeds the allowance with a graph in the tens of millions of nodes); the probe script is benchmarks/experiments/delta_scan_probe.py in the repository above, PROBE_BASE=10000000 PROBE_MODE=bounded PROBE_WAIT_REBUILD=1.

Edited 2026-11-14: the evidence files moved to humemai/mmdbbench; the links above point there now.

Activity

Next
  1. github-actions
    added
    bug
    performance
    vectorVector index and embedding search
    on Sep 8, 2026
  2. robfrank
    added this to the 26.10.1 milestone on Sep 8, 2026
  3. robfrank
    added
    severity:majorA feature is broken or returns wrong results, with no practical workaround
    on Sep 19, 2026
  4. lvca
    self-assigned this
    on Sep 23, 2026
  5. lvca
    added
    in progressThe team is actively working on this issue
    and removed
    in progressThe team is actively working on this issue
    on Sep 23, 2026
  6. lvca commented on Sep 23, 2026

    @lvca
    lvca
    on Sep 23, 2026
    Member
    More actions

    This needs a design decision (warning-only diagnostic vs. a fallback admission mode vs. a non-resident-old-graph rebuild) before implementation, and reproducing it needs a 24GB-heap / 10M-vector benchmark rather than a unit test. Splitting this out of the #8232 batch into its own dedicated follow-up; keeping the milestone and assignment for now.

  7. lvca
    added
    severity:minorCosmetic, documentation, edge case, or a workaround exists
    and removed
    severity:majorA feature is broken or returns wrong results, with no practical workaround
    on Sep 30, 2026
  8. tae898
    added a commit that references this issue on Oct 2, 2026

    bindings docs: official pages match the source and engine; known issu…

    83a70a0
  9. robfrank
    modified the milestones: 26.10.1, 26.11.1 on Oct 5, 2026
  10. lvca
    added
    in progressThe team is actively working on this issue
    on Oct 6, 2026
  11. 2 remaining items

  12. lvca
    added 5 commits that reference this issue on Oct 6, 2026

    review: credit the on-heap graph only when a collection ended after i…

    4242a35

    review: credit the on-heap graph only after a tenured-pool collection…

    1b0c9a5

    review: key the tenured-collection check on the collector name, share…

    48070ae

    review: whitelist the tenured collectors, exit early before reclaimin…

    bedfadc

    Merge pull request #9289 from ArcadeData/fix/7260-vector-rebuild-defe…

    0be1311
  13. lvca
    closed this as completedin #9289on Oct 6, 2026
  14. lvca commented on Oct 6, 2026

    @lvca
    lvca
    on Oct 6, 2026
    Member
    More actions

    Fixed in #9289 (26.11.1).

    When a rebuild did not fit in memory next to the current on-heap graph, it was deferred again and again, so the pending-vectors buffer kept growing and every query got slower.

    Now, before deferring, the index swaps the in-memory graph for its saved on-disk copy and rebuilds next to that, which usually fits. Searches are a bit slower until the new graph is ready. The new residentGraphDemotions index statistic counts these swaps, and the deferral warning is logged once per streak instead of on every attempt. If it still does not fit, the rebuild is deferred as before.


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  15. lvca
    removed
    in progressThe team is actively working on this issue
    on Oct 6, 2026
  16. tae898 commented on Oct 6, 2026

    @tae898
    tae898
    on Oct 6, 2026
    ContributorAuthor
    More actions

    Checked on a laptop with the merge of #9289 (0be13112ec57ca591cf30da0796fc6b4bc603929, CI-built distribution jars) against main just before it (5d1259e17306627a610cd40596e9005976cd25cf, the first parent of that merge), on Temurin 25 with -XX:+UseCompactObjectHeaders and on Temurin 21. java -version printed OpenJDK Runtime Environment Temurin-25.0.4+7 (build 25.0.4+7-LTS) with OpenJDK 64-Bit Server VM Temurin-25.0.4+7 (build 25.0.4+7-LTS, mixed mode, sharing), and OpenJDK Runtime Environment Temurin-21.0.12+8 (build 21.0.12+8-LTS) with OpenJDK 64-Bit Server VM Temurin-21.0.12+8 (build 21.0.12+8-LTS, mixed mode, sharing).

    This is a laptop-scale reproduction, not the original 24 GB heap and 10M vectors: embedded, -Xmx380m (G1), 150,000 vectors of 64 dimensions with COSINE and a built graph, then 40,000 more written so they sit in the pending buffer, then queries for up to 60 seconds (a query is what fires the trigger). The heap is sized so that the resident on-heap graph (55 MB) plus a second graph does not fit the 90% allowance (the deferral says it needs about 180 to 198 MB), while the build next to the on-disk copy does (the demotion line says about 142 MB). The Java program uses the public engine API only (SQL DDL, save(), findNeighborsFromVector(), TypeIndex.getStats()), with no explicit GC and not the package-private overload the PR's test uses; the only non-default settings are maxPageRAM=32 and rebuildDeferralCooldownMs=1000, so a deferral streak shows in a minute instead of in half an hour.

    Three runs per build and JDK (12 runs), same outcome in every one:

    build rebuild attempts deferred (rebuildsDeferredForMemory) deferral WARNINGs residentGraphDemotions rebuild completed pending buffer at the end
    5d1259e17306 58 58 58 statistic absent no, graph stays at 150,000 nodes 40,000
    0be13112ec57 1 0 0 1 yes, 190,000 nodes, resident graph on disk during the build and on heap again after it about 150 (the nodes the build could not link)

    With rebuildMaxHeapPercent=50, so that the build does not fit even next to the on-disk copy (3 runs per build and JDK): 44 attempts and 44 deferrals on both builds, 44 WARNINGs on the build before and 1 on the merge, residentGraphDemotions 0 on the merge, no rebuild on either, which is the "deferred as before" case the PR describes.

    With writes continuing during the window (400 vectors per second, 3 runs per build and JDK): on 5d1259e17306 the buffer grew from 40,000 to about 64,000 with 58 or 59 deferrals and no rebuild (6 of 6). On 0be13112ec57 all 6 rebuilds completed: 4 with one demotion at the first attempt, 1 with 5 deferrals (one WARNING) and a demotion on the sixth attempt, and 1 admitted at the first attempt by the existing page cache reclaim with no demotion, because the post-collection heap reading was 202 MB available at that moment. The admission follows that reading, which on G1 moved between 39 and 202 MB available in the same configuration.

    Only the deferral WARNING is once per streak: every declined attempt still logs INFO Starting async graph rebuild and Acquired rebuild permit, and on the fixed build also Loaded graph from disk, because a declined attempt loads the on-disk graph and drops it again (at the default 30 s cooldown that is once per 30 s).

    Not checked: the 24 GB and 10M case itself, search latency and result sets while the graph is the on-disk one (a query ran every 50 ms throughout without an error, but I neither timed nor compared them), recall after the rebuild, collectors other than G1, and the server.

  17. tae898
    added 3 commits that reference this issue on Oct 6, 2026

    docs: retire stale and duplicate Python bindings pages, fix what drif…

    d76767e

    docs: retire stale and duplicate Python bindings pages, fix what drif…

    4571100

    docs: retire stale and duplicate Python bindings pages, fix what drif…

    88befc8
  18. oc007us
    added a commit that references this issue on Oct 6, 2026

    fix(vector): demote the resident on-heap graph to its persisted twin …

    0f7c05c
  19. tae898
    added a commit that references this issue on Nov 14, 2026

    Migrate piece 3 to mmdbbench: remove benchmarks/experiments/evidence …

    71512f3
  20. lvca
    added a commit that references this issue on Nov 18, 2026

    fix(#12380): an index reading its graph from the pages no longer keep…

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

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

bugperformanceseverity:minorCosmetic, documentation, edge case, or a workaround existsvectorVector index and embedding search

Type

No type

Projects

No projects

    Milestone

    • 26.10.2

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.