Help reproducing the 100k/27s benchmark in #560: ingestion throughput and Redis CPU saturation
Maintainer thường phản hồi trong vòng 1 ngày
@lindesvard đang làm issue này rồi.
Từ ngày 20/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 36/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- clickhouse, kafka, redis, typescript
- Lĩnh vực
- data-engineering, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.2k
- Fork
- 523
- Merge trung bình
- 19 giờ 23 phút
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Openpanel-dev/openpanel
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Openpanel-dev/openpanel#579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ClickHouse retry logs print CLICKHOUSE_URL with its passwordCó thể đã có người làm @ppjsw đã nhận 2 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Openpanel-dev/openpanel#551 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
login page needs refinementCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Openpanel-dev/openpanel#495 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Session-grouped queries treat every sessionless event as one session (wrong results, ClickHouse OOM)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Openpanel-dev/openpanel#575 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Openpanel-dev/openpanel#563 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Openpanel-dev/openpanel
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
logto-io/logto#9837 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
lingdojo/kana-dojo#32964 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mastra-ai/mastra#28194 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority-low refactor-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 3 ngày