Files
hakmem/docs/analysis/PHASE12_STRATEGIC_PAUSE_NEXT_INSTRUCTIONS.md
2025-12-14 20:59:23 +09:00

79 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase 12: Strategic Pause戦略的休止次の指示書
## 0. Status2025-12-14
**✅ RECOMMENDED: Strategic Pause**
- 根拠: `docs/analysis/PHASE12_STRATEGIC_OPTIONS_ANALYSIS.md`
- 直近の NO-GO: Phase 11-8.35%)— call-site helper の累積固定費が致命的
## 1. 目的Pause の狙い)
Phase 6-10+24.6%)で “構造改善の勝ち筋consolidation / dedup / monolithic early-exit” は一通り適用済み。
ここから先は micro-opt 領域(各 +1〜2%)でリスクが上がるため、**次のブレークスルーの方向性を再構築**する。
## 2. Pause の成果物Deliverables
### A) 現在位置の確定(性能・安定性)
- Mixed 基準値clean env, 10-run mean/median/stdev
- 主要プリセットの健康診断exit code
- Perf の “次の frontier” 候補self% ではなく ROI 観点で 2〜3 個に絞る)
### B) 比較ベンチmimalloc/jemalloc/system
- 同一条件での比較表Throughput + RSS + minor faults
- 「どの gap が wrapper/分類/フリーリスト/ページ供給に由来するか」の仮説メモ
### C) Production workloadもしあるなら
- 1 本だけでも良いので、実ワークロード(もしくは近い再現負荷)で:
- Throughput / tail latencyP95/P99
- RSS / fragmentation 指標(可能な範囲)
### D) 次フェーズの意思決定
次の “大きい方向性” を 1 つに絞る(例: Mid/Large, multi-thread scaling, footprint/fragmentation
## 3. 実施手順(最小・再現性重視)
### 3.1 Mixed 基準clean env
```sh
scripts/run_mixed_10_cleanenv.sh
```
ENV 漏れが疑われるときは `env -i` で 1-run も取る)
### 3.2 Health Profiles
```sh
scripts/verify_health_profiles.sh
```
### 3.3 Perf “定点観測” セット(差分の芯)
Throughput だけでなく、memory-system 指標を同時に取る:
```sh
perf stat -e cycles,instructions,branches,branch-misses,cache-misses,dTLB-load-misses,minor-faults -- \
env -i PATH="$PATH" HAKMEM_PROFILE=MIXED_TINYV3_C7_SAFE ./bench_random_mixed_hakmem 200000000 400 1
```
(必要なら `perf record` + `perf report` で top を確認)
## 4. 運用ルールBox Theory / A/B
- A/B は **同一バイナリで ENV トグル**(別バイナリ比較は layout 差に負けやすい)
- “勝ち箱” は preset に昇格、負け箱は freeze本線を汚さない
- 観測は最小(カウンタ/ワンショット)。常時ログは禁止
## 5. Phase 13 へ進む条件(解除ゲート)
次のどれか 1 つが満たされたら Pause を解除して “次フェーズ” を開始する:
1) 実ワークロードで明確な bottleneck が特定できた≥5% かつ ROI が見込める)
2) mimalloc/system との差分が “単一の構造課題” として言語化できた(例: ptr→meta 到達, remote free, page供給
3) Phase 12 の比較で “効く最適化方向” が 1 本に絞れた