Skip to content

feat(entity-store-perf): parallel bulk ingest, ingest-rate, duration mode, and entity poll fixes#383

Open
gurevichdmitry wants to merge 5 commits into
mainfrom
dg-add-ingest-rate
Open

feat(entity-store-perf): parallel bulk ingest, ingest-rate, duration mode, and entity poll fixes#383
gurevichdmitry wants to merge 5 commits into
mainfrom
dg-add-ingest-rate

Conversation

@gurevichdmitry

@gurevichdmitry gurevichdmitry commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves upload-perf-data-interval (and single upload-perf-data) for sustained load testing: higher log ingest throughput, optional rate limiting, duration-based runs, and reliable post-upload entity polling.

Changes

  • Faster uploads (~800 → ~13k docs/sec observed): Read JSONL in 5k-doc batches and send parallel _bulk requests (pMap, default 8 concurrency, pipeline=_none, refresh=false) instead of a single helpers.bulk stream.
  • --bulk-concurrency: CLI flag to tune parallel bulks (default 8; values above 8 did not improve throughput on our test cluster).
  • --ingest-rate: Optional max docs/sec per upload (throttle pauses between batches). Logs achieved rate and notes when the cluster, not the flag, is the bottleneck.
  • --duration: Wall-clock interval mode (mutually exclusive with --count); keeps uploading until the deadline with --interval pauses between passes.
  • Docs: Updated entity_store_perf/README.md for new flags and behavior.

yarn start upload-perf-data-interval medium --deleteData --noTransforms --interval 2 --duration 5m --ingest-rate 25000 --bulk-concurrency 8

Copilot AI review requested due to automatic review settings May 20, 2026 14:16
@gurevichdmitry gurevichdmitry requested a review from a team as a code owner May 20, 2026 14:16
@gurevichdmitry gurevichdmitry requested a review from tiansivive May 20, 2026 14:16

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

Pull request overview

This PR enhances the entity_store_perf upload commands to better support sustained load/performance testing by increasing ingest throughput, adding optional throttling and duration-based execution, and making post-upload entity polling more reliable (with timeouts and clearer progress).

Changes:

  • Add configurable parallel bulk ingest (--bulk-concurrency) and optional per-upload ingest throttling (--ingest-rate), plus achieved ingest-rate logging.
  • Add duration-based interval runs (--duration, mutually exclusive with --count) and refactor the interval loop into a shared helper.
  • Improve post-upload entity polling with timeout support, match_all counting when --deleteData is used, and progress/status logs; update docs accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/commands/shared/elasticsearch.ts Adds optional pipeline to bulkUpsert, extends streamingBulkIngest with defaults + concurrency/pipeline support.
src/commands/entity_store_perf/index.ts Adds CLI flags for bulk concurrency, ingest rate, and duration; updates argument handling/validation.
src/commands/entity_store_perf/entity_store_perf.ts Implements new upload batching + parallel bulk indexing, ingest-rate throttling, duration mode, and improved entity polling logic.
src/commands/entity_store_perf/README.md Documents new flags (--bulk-concurrency, --ingest-rate, --duration) and updated interval/polling behavior.

Comment thread src/commands/entity_store_perf/entity_store_perf.ts Outdated
Comment thread src/commands/entity_store_perf/entity_store_perf.ts
Comment thread src/commands/shared/elasticsearch.ts
Comment thread src/commands/entity_store_perf/index.ts Outdated
Comment thread src/commands/entity_store_perf/entity_store_perf.ts

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread src/commands/entity_store_perf/index.ts Outdated
Comment thread src/commands/entity_store_perf/index.ts
Comment thread src/commands/entity_store_perf/index.ts Outdated
Comment thread src/commands/entity_store_perf/entity_store_perf.ts
@romulets romulets force-pushed the dg-add-ingest-rate branch from 3b48f79 to 3bea6b8 Compare May 21, 2026 09:42
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.

3 participants