Skip to content

BSBM Update throughput on feat/pooled-named-graphs: original ~10% gap not reproduced under controlled inputs; small workload effect unresolved #2136

Closed

Description

@bplatz

Status (2026-10-18)

Original 10% gap not reproduced under controlled inputs; small workload effect unresolved.

Controlled inputs. Both candidates started from the same commit chain and received the identical 100 commits; full results are in the comment of 2026-10-18. Under those inputs, every component of the update path matches next:

  • the incremental build, run standalone and by the server's indexer;
  • allocations, bytes written and reads;
  • Q10 with writes pending.

Workload on the same store pair. The adaptive Update-mix workload measured 0.970 at the median, with pair ratios from 0.85 to 1.09. That does not establish that any regression is below 3%.

Outlier sensitivity, standalone build pairs.

  • Pair 1 includes the one outlier: next took 30 s instead of about 15.6 s. In that pair, next read 3.4 GB from disk and head 425 MB; no later rep read anything.
  • With pair 1, the paired wall ratio has a median of 0.993 and a ratio of means of about 0.90.
  • Without it, the median is 0.995 and the ratio of means about 1.00.
  • There is no established exclusion rule, so pair 1 stays in.

Next. A bounded fixed-cadence diagnostic: identical commit chains, update batches and query sequences, with indexing windows and queries at predetermined times. A small pilot comes first, to check whether it reduces variance. The adaptive workload remains the check of production behaviour.

The description below is the original report. Its 10% figure compared the two builds on separately imported stores, in different sessions.


Summary

On feat/pooled-named-graphs, BSBM 100M Update-mix throughput is about 10% below next (b68f71c). Individual updates are no slower.

Supported by the measurements: an amplification loop. Background index builds take longer, so each build covers more commits. More writes therefore stay unindexed, and every explore query re-translates more novelty.

Not established: why a fixed amount of indexing work is slower.

The regression has not been attributed to a commit.

Measurements

Setup: m7a.4xlarge DB, m7a.2xlarge driver, file storage. The branch build ran on a clean re-import.

next b68f71c branch 0db5da5
Update-mix QMpH (2 runs) 10,409 / 10,856 9,429 / 9,647
update latency p50 ~2.93 ms ~2.93 ms
background build, mean 6.6 s, 95 commits 9.1 s, 125 commits
explore query execution ~6.4 ms ~6.9 ms

Controlled build. One incremental build of the same 100 commits was slower on the branch:

  • 9% slower in one session: 12.3–12.5 s against 11.4–11.5 s.
  • 1.5–2% slower in another session.

The extra time is spread across the subject and string reverse-dictionary updates and the forward packs. The branch does not change that code.

Bisect, stopped at the noise floor.

  • 6d53d60 ("graph ids are 32-bit") built as fast as next.
  • 49baba4 ("a pooled leaf holds one leaflet") fell between the two.
  • Per-run noise was ±3% (about ±0.3 s), so later steps could not be told apart.

Known confounders

Neither is assumed to explain this regression.

Next step

Paired profiling of a fixed build comes before any further bisection:

  • Give each candidate an independent copy of the same starting store and an identical 100-commit input.
  • Alternate the order in which candidates run.
  • Measure elapsed time separately from CPU time, allocations, bytes read and written, and storage operations.
  • Check whether slower indexing creates extra translation work that then competes with indexing.

Activity

  1. added
    P1
    area:storage
    performance
    on Oct 18, 2026
  2. bplatz commented on Oct 18, 2026

    @bplatz
    ContributorAuthor

    Paired fixed-store profiling (2026-10-18)

    Setup

    Candidates. Both are release builds of fluree-db-cli with default features, which means the glibc allocator. Both ran on an m7a.4xlarge.

    commit sha256
    next b68f71c ba8480dc2273bfc5decc857069885ba11ee5dc817bcb1d4b93950c8c7c5164fe
    head 619209d 4d91e372bf36f67150c289ecd6d34b858610bc03f3e3f2d63b82f068c8940b52

    Fixed store.

    • One commit chain: the BSBM 100M bulk import, t1–33. This is the store that was head's clean re-import in the earlier A/B.
    • Reindexed by each candidate at t33, in its own format. The two formats cannot share an index: a version-3 root means inline decimals on next and wide ids on head.
    • The same 100 update commits (t34–133) were written once by next. Head's copy received the identical commit blobs and commit-head record.
    • Reset: every run resets the candidate's copy from its snapshot.
    • Run conditions: alternated order, FLUREE_STORAGE_FSYNC=1, 22 GB cache.

    Results

    Component measurements (head/next is the paired median):

    measurement pairs next head head/next
    one incremental build of the 100 commits as a standalone fluree index: wall 6 15.58 s 15.50 s 0.993
    same build: CPU (task-clock) 6 15.79 s 15.69 s 0.991
    same build: instructions 6 122.0 G 123.5 G 1.010 (1.008–1.015)
    same build: allocation calls (heaptrack) 1 29.06 M 29.07 M 1.000
    same build: bytes / files written 6 2,986 MB / 1,878 2,978 MB / 1,878 0.997 / 1.000
    same build: reads, count / bytes 6 4,467 / 11.75 GB 4,467 / 11.74 GB 1.000
    the same build by the server's background indexer 4 14.75 s 14.81 s 1.001
    explore Q10 with the 100 commits pending, indexing off 4 5.65 ms 5.59 ms 0.99

    Every step of the build log matches to within 0.04 s.

    Import layout. next built the same 100 update blocks on its own bulk import and on this commit chain at the same cost: paired wall 0.996 and CPU 1.002 over 5 pairs.

    Update-mix workload on the fixed pair (driver m7a.2xlarge, 1 client, 400 runs):

    rep next QMpH head QMpH head/next next build s / commit head build s / commit next explore exec head explore exec
    1 10,020 9,729 0.971 0.073 0.075 6.41 ms 6.85 ms
    2 9,785 10,671 1.091 0.073 0.069 6.92 ms 6.52 ms
    3 10,263 8,744 0.852 0.071 0.083 6.51 ms 7.04 ms
    4 9,958 9,650 0.969 0.075 0.077 6.73 ms 6.92 ms
    median 9,989 9,690 0.970

    Update latency p50 was 2.90–2.99 ms in every cell.

    What this changes

    • No component regressed on a fixed store. Build cost (standalone and in the server), allocations, I/O, and query cost at fixed novelty all match.
    • The 10% figure was measured across separate stores. The description's ~10% compared head and next on different imports, in different sessions. On the shared commit chain, the workload gap is 3% at the median, inside a per-pair spread of −15% to +9%. next itself measured 10,409 and 10,856 on its own import earlier, and about 10,000 here.
    • Not established: whether a residual workload effect of a few percent exists.
      • Head's build time per commit and its explore execution time are each about 4% higher at the median, but within the cell spread.
      • The workload's indexing cadence feeds back on itself: a longer build covers more commits and leaves more novelty. That makes single cells noisy.
      • Resolving ~3% needs many more rotated cells, or a harness that indexes at a fixed cadence.
    • One unexplained outlier. The first standalone build rep for next took 30 s instead of 15.6 s. That run read 3.4 GB from disk where every other rep read none, and its extra time was in dictionary reconciliation.

    Identifiers

    Stores (bsbm DB box, ~/x2136/):

    store contents
    t33-next, t33-head the reindexed bases
    s-next, s-head the bases plus the 100 commits
    s-pn next's own import plus the same 100 blocks
    index roots at t33 next baghybqabciqer6lp47wudv4grhocxrjkmfyhi4aycnkc6yd7q2vmkqovqn5c42i, head baghybqabciqo7izomorj5kt3xzo776u432g6kusfmpqycvndrsg4p2emupuusoi
    commit head (both) t133, the same CID

    Artifacts: the scripts, logs, perf stat and time -v output, perf and heaptrack data, and the server logs of each workload cell are archived with the run (benchmark-db runs/bsbm-2136-20261018). The boxes are stopped, not terminated.

    Related: #2134, #2135.

  3. changed the title [-]BSBM Update throughput ~10% below next on feat/pooled-named-graphs: incremental builds are slower[/-] [+]BSBM Update throughput on feat/pooled-named-graphs: original ~10% gap not reproduced under controlled inputs; small workload effect unresolved[/+] on Oct 19, 2026
  4. bplatz commented on Oct 19, 2026

    @bplatz
    ContributorAuthor

    Closing.

    Controlled inputs. Both candidates started from the same commit chain and received the identical commits. Under those inputs, every component of the update path matches next:

    • one incremental build: wall 0.993, CPU 0.991, allocations 1.000, bytes written and reads equal;
    • the same build by the server's indexer: 1.001;
    • queries with writes pending: 0.99.

    The one consistent difference is about 1% more instructions per build (1.008–1.015). That is plausibly the cost of 32-bit graph ids and wider run records, and it is accepted as part of the pooled-graphs change.

    Workload. On the same store pair, the Update-mix workload measured 0.970 at the median, with pair ratios from 0.85 to 1.09. That spread comes mainly from the workload's indexing feedback and from page-cache pressure on the benchmark box.

    The original ~10% compared separately imported stores in different sessions, and does not stand as a branch cost.

    Found during this investigation and tracked separately: #2134, #2135.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1area:storageperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions