Help reproducing the 100k/27s benchmark in #560: ingestion throughput and Redis CPU saturation
维护者通常 1 天内回复
@lindesvard 已经在做这个了。
开始于 2026年10月20日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 36/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- clickhouse, kafka, redis, typescript
调研方向
Start by reading issue #560 and its high-volume guide, then compare their benchmark script, payload and completion criteria with the workload details recorded here. Use the listed configuration and reconciliation criteria to frame a comparable reproduction, and gather measurements that separate worker processing, Redis buffer operations and ClickHouse insertion waits. Done means the baseline and resource bottleneck are characterized; the issue does not name specific code files or tests.
由索引模型根据 Issue 内容生成。
描述
Summary
Thank you for #560 and the updated high-volume guide. We tested main commit 7f6f7f9e2b978bd0472807f586d65928f793d08c and would like help aligning our workload with the reported 100,000 events reaching ClickHouse in 27 seconds.
Our local tests take approximately 87–104 seconds for 100k events through HTTP, or 74–89 seconds replaying Kafka with the API stopped. A completed 1m-event Kafka replay takes 441.25 seconds (~2,266 business events/s). These are finite-run completion rates, not measured sustained capacity. We are reporting a performance investigation, not claiming a confirmed regression or an equivalent benchmark comparison.
Environment
- Intel i7-8700B host; Colima VM using macOS Virtualization.Framework, native x86_64, 6 vCPU / 24 GB shared.
- Each API and worker container: limit 2 CPU / 4 GB; these are caps, not dedicated cores.
- ClickHouse 25.10.2.65: limit 2 CPU / 8 GB.
- Redis 7.2.5-alpine: no CPU quota or CPU pinning; default
io-threads=1,io-threads-do-reads=no. - Redpanda v25.1.9:
smp=1, configured memory 1 GB; 25 topic partitions. - Some original infrastructure/dashboard containers remained running, while the original API/workers were paused. This was not a dedicated bare-metal capacity test.
- Application ingestion code was unchanged from the tested commit.
Test-only differences to disclose
The isolated test database's sessions sorting key includes id, to avoid cross-session collapsing under colliding creation timestamps. The event table was unchanged. This is a test schema variant, not a claim of unmodified upstream acceptance.
For successful Kafka replay controls we used Redpanda group_initial_rebalance_delay=5000 ms after observing duplicates during an initial rebalance with the original 0-ms setting. This is not an exactly-once guarantee or a general rebalance fix. Those correctness observations are being documented separately.
Workload and completion criteria
- Synthetic game-style events, approximately 20 custom properties, including device/account/role/server identifiers, sequence, level, channel, currency and an array property.
- 10,000 identities: 10 events each for 100k; 100 each for 1m.
- Counts/rates below refer to business events, excluding automatically generated
session_startevents. - Each run used fresh ClickHouse/Redis volumes, verified empty before starting.
- HTTP tests: 2 API containers, 2 Node generator processes × 128 concurrent requests, single-event HTTP requests directly inside the Docker network; no Caddy/TLS. Timer starts after services are ready and ends after complete business events and all buffers drain.
- Replay tests: API/generators stopped; replay a fixed Kafka fixture into empty sinks with a fresh consumer group. Starting offsets are 0 across all 25 partitions and source totals are verified. Timer includes worker cold startup, group joining, and completion with Kafka committed lag and all buffers at zero.
- Historical completed test topics were cleaned before replay testing, reducing broker overhead. HTTP vs replay is therefore not a controlled comparison of API overhead alone.
Configuration
Selected configuration for the replay tests:
EVENT_BUFFER_BATCH_SIZE=10000
EVENT_BUFFER_CHUNK_SIZE=10000
SESSION_BUFFER_BATCH_SIZE=20000
# SESSION_BUFFER_CHUNK_SIZE is unset
PROFILE_BUFFER_BATCH_SIZE=500
PROFILE_BUFFER_CHUNK_SIZE=1000
CRON_CONCURRENCY=6
BUFFER_CH_INSERT_CONCURRENCY=5
This is a tested configuration, not a claim that it is globally optimal.
Results
HTTP, 100k events
| Workers | Event batch / chunk | Completion time | Business events/s |
|---|---|---|---|
| 2 | 10,000 / 2,000 | 90.4 s | 1,106 |
| 2 | 10,000 / 10,000 | 87.3 s | 1,146 |
| 2 | 10,000 / 10,000, repeat | 92.9 s | 1,076 |
| 2 | 50,000 / 10,000 | 96.8 s | 1,033 |
| 3 | 10,000 / 10,000 | 104.4 s | 958 |
Increasing batch size or replicas did not improve these shared-VM HTTP runs. The two 10k-chunk runs do not demonstrate a significant improvement over the 2k-chunk run.
Kafka replay, API/generators stopped
| Events | Workers | Redis configuration | Completion time | Business events/s |
|---|---|---|---|---|
| 100k | 2 | Default | 89.10 s | 1,122 |
| 100k | 3 | Default | 74.21 s | 1,348 |
| 100k | 3 | 2 I/O threads, threaded reads enabled | 77.83 s | 1,285 |
| 100k | 3 | Default, repeat | 79.46 s | 1,258 |
| 1m | 3 | Default | 441.25 s | 2,266 |
All listed runs passed event/session/profile reconciliation. The 1m run had 1,000,000 business rows and unique sequences, 10,000 reconciled sessions with 100 events each, 10,000 profiles, and no remaining Kafka lag or buffer backlog. Redis I/O threading showed no clear gain within the observed variation.
Observations worth investigating
During sampled middle portions of the 1m replay:
- Redis averaged about 93% CPU, with 100% representing one CPU core.
- Each worker averaged approximately 103–108% CPU.
- ClickHouse averaged about 46% CPU, with a sampled peak of about 160% against its 200% cap. This does not exclude transient ClickHouse or I/O waits.
- At 390.64 s, Kafka lag was first observed at zero; 640k business events had landed, with about 360k event-buffer rows and 350k session-buffer rows pending.
- The remaining 360k business events landed and all buffers drained in about 50.61 s (~7,114 business events/s during this tail only).
The tail suggests draining can be faster once upstream processing pressure subsides; it does not establish sustained ingestion capacity. Redis CPU is a lead, not proof that Redis alone is the bottleneck. We do not yet have a CPU profile proving the limiting code path.
Questions
- Could you share the exact script/command and payload used for the 100k/27s result in #560, including payload size, identity/session cardinality, and event mix?
- What hardware, runtime version, container limits, Kafka/Redis settings, and ClickHouse schema/materialized views were used?
- Does the 27-second completion criterion mean business events visible in ClickHouse only, or also drained session/profile buffers? Does timing include startup or group joining?
- For this workload, which measurements would you recommend next to distinguish worker processing, Redis buffer operations and ClickHouse insertion waits?
- With the current per-buffer locking/drain design, what worker/Redis/ClickHouse deployment and tuning would you recommend for sustained 5k+ business events/s while keeping session/profile backlog bounded?
We would like to reproduce the baseline first, then provide comparable measurements rather than attributing the difference to a particular component prematurely.
- 主要语言
- TypeScript
- 星标
- 7.2k
- 派生
- 531
- 平均合并
- 1 天 2 分钟
- 30 天内合并 PR
- 48
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Openpanel-dev/openpanel 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
Openpanel-dev/openpanel#610 · 1 条评论 ·
维护者通常 1 天内回复
-
ClickHouse retry logs print CLICKHOUSE_URL with its password可能已有人在做 @ppjsw 于 8 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 92/100
Openpanel-dev/openpanel#551 · 1 条评论 ·
维护者通常 1 天内回复
-
login page needs refinement可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
Openpanel-dev/openpanel#495 ·
维护者通常 1 天内回复
-
Dashboard dropdown pickers re-render on every animation frame while open可能已有人在做 @MihirSachdeva 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 35/100
Openpanel-dev/openpanel#629 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
Openpanel-dev/openpanel#615 ·
维护者通常 1 天内回复
查看 Openpanel-dev/openpanel 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
area:plugins area:security area:skills bug has repro
难度 2/5 1-3 小时 新手友好度 76/100
anthropics/claude-code#105911 ·
维护者通常 1 天内回复
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 74/100
dev-five-git/devup-ui#879 ·
维护者通常 11 天内回复
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifacts未关闭
难度 2/5 1-3 小时 新手友好度 72/100
Fission-AI/OpenSpec#2165 ·
维护者通常 1 天内回复
-
🐞 bug 🧐 unconfirmed
难度 2/5 1-3 小时 新手友好度 66/100
Tencent/tdesign-vue-next#7032 · 1 条评论 ·
维护者通常 1 天内回复