maple start --in-memory: generate chDB settings that suit a throwaway store
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- clickhouse, typescript
- 領域
- cli
調査の方向性
apps/cli/src/commands/server.ts#L1535-L1538 から始めてください。ここではインメモリ分岐が設定生成をスキップしています。L689-L705 の resolveChdbConfigFile を、倣うべきモデルとして読んでください。ストアの隣に生成された設定ファイルを書き出すインメモリ経路を追加し、表にある 4 つの <merge_tree> の値を書き込んでください。ユーザーが指定した --chdb-config-file は変更しないでください。完了条件は、maple start --in-memory がそのファイルを生成し、system.merge_tree_settings で設定が変更された状態として表示されることです。CLI サーバーコマンドの既存テストを実行し、data-dir モードに影響がないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Written by an AI agent (Claude) on behalf of @jasonkuhrt.
maple start --in-memory keeps one run's telemetry and deletes it on exit, but its chDB runs with chDB's defaults, which suit a long-lived store. Each OTLP export is a synchronous INSERT per datasource that fans out through the materialized views into 16 to 20 new parts, so even a small dev workload writes about 315 files per insert. To get settings that suit a throwaway store, each caller has to write a chDB config and pass it in:
maple start --in-memory --offline --chdb-config-file ./throwaway-store.chdb.xml
<!-- throwaway-store.chdb.xml -->
<clickhouse>
<merge_tree>
<min_bytes_for_wide_part>10737418240</min_bytes_for_wide_part>
<min_parts_to_merge_at_once>20</min_parts_to_merge_at_once>
<cleanup_delay_period>1</cleanup_delay_period>
<max_cleanup_delay_period>5</max_cleanup_delay_period>
</merge_tree>
</clickhouse>
Cause
Data-dir mode generates a chDB config (resolveChdbConfigFile, for checkpoints), while in-memory mode passes on only a user-supplied file (apps/cli/src/commands/server.ts#L1535-L1538):
const chdbConfigFile =
inMemory === undefined
? yield* resolveChdbConfigFile(dataDir, Option.getOrUndefined(a.chdbConfigFile))
: Option.getOrUndefined(a.chdbConfigFile)
Proposal
When --in-memory is set and no --chdb-config-file is given, generate a config beside the in-memory store holding the four <merge_tree> settings above, the way resolveChdbConfigFile generates one for data-dir mode. A user-supplied file stays untouched.
| Setting | Value | What it does for a throwaway store |
|---|---|---|
min_bytes_for_wide_part |
10 GiB (chDB default 10 MiB) | Parts stay compact, one data file for all columns. A merged wide traces part is about 200 files and is rewritten on nearly every merge; a new compact one is 29. |
min_parts_to_merge_at_once |
20 | A merge waits for 20 parts instead of rewriting on every insert. |
cleanup_delay_period / max_cleanup_delay_period |
1 s / 5 s (chDB default 30 s / 300 s) | Merged-away parts were over 90% of what sat on disk; they now go within seconds. |
Costs: up to about 20 active parts per partition per table, and compact parts read single columns more slowly. Neither shows at the size of one run's telemetry.
Measurements
A harness ran Maple v0.3.0's schema (local schema v41) on libchdb 26.7 directly, 15k rows preloaded, 5 rows inserted every 2 s, 150 s per variant, on an M-series Mac under heavy unrelated load. File counts were stable between repeats; CPU was noisy.
| Variant | Parts per insert | Files per insert | CPU-s per row |
|---|---|---|---|
| chDB defaults | 20.0 | 314 | 0.08 |
| chDB defaults, repeat | 20.1 | 316 | 0.11 |
| compact parts | 20.1 | 284 | 0.07 |
min_parts_to_merge_at_once 20 |
17.5 | 251 | 0.06 |
compact + min_parts_to_merge_at_once 20 |
17.6 | 246 | 0.07 |
| same + cleanup delay 1 s | 17.4 | 244 | 0.11 |
- Files per insert: 315 → 244, about 22% fewer.
- Files standing at the end of the run: 11,096 → 2,492 with the 1 s cleanup delay.
- The harness under-counts merges (0.19 merges per insert on
traces, against about 0.9 on a live store), so the compact-parts gain on a live store is likely larger. maple start --in-memory --chdb-config-file <file>on v0.2.0 shows all four overrides as changed insystem.merge_tree_settings.
We run Maple this way, with the file above, for every dev stack and every test.
Related: #1852 (per-export cost), #1764 (added --in-memory).
- 主要言語
- TypeScript
- スター
- 1.8k
- フォーク
- 120
- 平均マージ
- 8時間 11分
- マージ済み PR(30日)
- 667
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MapleTechLabs/maple のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MapleTechLabs/maple#1921 ·
メンテナーはふだん 1 日以内に返信
-
Alerting: Linear as a destination type, opening one issue per incident対応中かも @Makisuo が 1 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
MapleTechLabs/maple#1896 ·
メンテナーはふだん 1 日以内に返信
-
@maple-dev/alchemy: typed dashboard props, a managed refresh interval, and adopting a dashboard built in the UI対応中かも @jasonkuhrt が 2 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
MapleTechLabs/maple#1891 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
MapleTechLabs/maple#1874 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
MapleTechLabs/maple#1873 ·
メンテナーはふだん 1 日以内に返信
MapleTechLabs/maple の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
lichess-org/lila#22324 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsオープンep:WebGPU platform:web quantization
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/onnxruntime#33752 ·
メンテナーはふだん 2 日以内に返信
-
[Skill Bug]: entra-agent-id: inaccurate blueprint permission inheritance and parent token sub claimオープンbug entra-agent-id
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/GitHub-Copilot-for-Azure#3467 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(worker): keep normal prepare waiting states failure-free対応中かも @LichKing-2234 が今日担当しました。 オープンagent:codex priority:P1
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AgoraIO-Extensions/agent-infra#3745 ·
メンテナーはふだん 1 日以内に返信
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framing対応中かも @Eapp1e が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
makecindy/cindy#7973 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信