Skip to content

perf(drivers): cut browse round trips on Redis, Memcached, Elasticsearch and MongoDB - #4332

Merged
datlechin merged 7 commits into
mainfrom
perf/nosql-driver-round-trips
Nov 18, 2026
Merged

datlechin merged 7 commits into
mainfrom
perf/nosql-driver-round-trips

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • P24 Redis: key browse sends SCAN COUNT sized to the keys it keeps, 1,000 to 10,000. The 100 key sample stays at 1,000.
  • P25 Memcached: a page is read in one gets. A request splits at 1,000 keys, a 64 KiB line or 16 MiB of listed item bytes.
  • P26 Kafka: not in this PR. Review found prefetched replies were not bounded in memory, so the item went back to main.
  • P27 Elasticsearch: deep paging sends _source: false on batches that end before the page. New product TableProElasticsearchCore.
  • P28 MongoDB: find sends batchSize = limit + 1. A script's own batchSize is kept, and a read with no row cap keeps the server default.
  • MemcachedKeyListingTests updated on purpose: a listed entry now carries the item size.
  • check-stream-idle-pacing.sh links the new Elasticsearch product.

Test plan

  • Redis 8.10.2, 10,000 to 500,000 keys, replay of a browse: 12 round trips before, 3 after.
  • MongoDB, shipped libmongoc against a scripted server: find + getMore before, find alone after.
  • New suites: RedisKeyScanCountTests, MemcachedValueBatchesTests, ElasticsearchDeepPageWalkTests, MongoDBFirstBatchTests.
  • MongoDBFirstBatchTests needs an iOS simulator, which this Mac lacks, so CI is its first full run. The same cases in a local harness fail on main and pass here.
  • Not run against a real Memcached, Elasticsearch or MongoDB server.

@datlechin
datlechin enabled auto-merge (squash) November 18, 2026 20:02
@datlechin
datlechin merged commit 140db52 into main Nov 18, 2026
25 of 27 checks passed
@datlechin
datlechin deleted the perf/nosql-driver-round-trips branch November 19, 2026 15:54
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