Skip to content

perf(zero-cache): batch serving replica apply work - #4

Closed
Karavil wants to merge 1 commit into
capy/rm-vs-load-storer-batchingfrom
capy/rm-vs-load-change-processor-batching
Closed

perf(zero-cache): batch serving replica apply work#4
Karavil wants to merge 1 commit into
capy/rm-vs-load-storer-batchingfrom
capy/rm-vs-load-change-processor-batching

Conversation

@Karavil

@Karavil Karavil commented May 26, 2026

Copy link
Copy Markdown
Owner

what changed

Batches serving-replica apply work in ChangeProcessor, including consecutive same-shape inserts and change-log writes.

benchmark output

medium-wide-batch-pressure, 15s, compared to storer batching:

tx/s: 804.0 -> 941.6
rows/s: 16,079.5 -> 18,832.4
fanout msg/s: 26,125.9 -> 30,654.6
avg VS tx apply: 0.881 ms -> 0.747 ms

validation

pnpm exec vitest --project='*no-pg*' run src/services/replicator/change-processor.test.ts src/types/lite.test.ts
pnpm run check-types
pnpm exec oxlint --config ../../oxlint.config.ts src/services/replicator/change-processor.ts src/types/lite.ts

Why: reduce per-row SQLite and change-log overhead while preserving ordered ChangeProcessor semantics

* cache DML SQL plans by table and row shape

* batch consecutive same-shape inserts into multi-row upserts

* batch change-log SET operations for insert batches
@Karavil
Karavil force-pushed the capy/rm-vs-load-storer-batching branch from ad78e24 to 660921a Compare May 26, 2026 19:02
@Karavil
Karavil force-pushed the capy/rm-vs-load-change-processor-batching branch from 388a68c to 379603c Compare May 26, 2026 19:02
@Karavil

Karavil commented May 26, 2026

Copy link
Copy Markdown
Owner Author

Replaced by rocicorp/mono PRs rocicorp#6070 through rocicorp#6078.

@Karavil Karavil closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant