Major Features: - Debug counter infrastructure for Refill Stage tracking - Free Pipeline counters (ss_local, ss_remote, tls_sll) - Diagnostic counters for early return analysis - Unified larson.sh benchmark runner with profiles - Phase 6-3 regression analysis documentation Bug Fixes: - Fix SuperSlab disabled by default (HAKMEM_TINY_USE_SUPERSLAB) - Fix profile variable naming consistency - Add .gitignore patterns for large files Performance: - Phase 6-3: 4.79 M ops/s (has OOM risk) - With SuperSlab: 3.13 M ops/s (+19% improvement) This is a clean repository without large log files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Phase 6.19 Results (2025-10-23)
実装概要
- L2.5: bump-run + ActiveRun を導入(TLS直詰め)。
HAKMEM_L25_RUN_BLOCKSで上書き可。 - L2.5: シャードハッシュ(splitmix64)を追加(
HAKMEM_SHARD_MIX=1)。 - ログ抑制:
HAKMEM_INVALID_FREE_LOG=0追加(既定OFF)。 - 計測:
l25_get,l25_alloc_tls_pageを HKM_TIMING に追加。
10s Large 4T(64KB–1MB, wrap=ON, timing=ON)
- 変更前ベスト(A/B): ~103,435 ops/s
- bump-run既定: ~44,099 ops/s(l25_get支配)
- bump-run + shard-mix: ~50,619 ops/s(l25_get平均サイクル低下)
- head-to-head: system 2.56M, mimalloc 5.99M, hakmem 51.5k ops/s(タイミングON)
所感
- ロック/シスコールは支配的でなく、l25_get/hak_alloc が大半。bump-run導入で「ミス時の書込み」は減らせたが、mmap頻度とホット書込み(ヘッダ)が残っており、まだ重い。
次の一手(P0続き → P1)
- P0: Remote-first 順序を既定化し、run補充を二段目へ。nonempty選択と trylock回数を抑制。
- P1: L2.5のヘッダライト縮小/ヘッダレス化(ページ記述子)で l25_get の memcpy/書込みを除去。
- P1: ラン長のA/B(特に64/128KBクラスの倍化)で mmap 回数をさらに圧縮。
ログ
- ベンチログおよびタイミングは
docs/benchmarks/*_L25_BUMPRUN_10s*および*_L25_HEAD2HEAD_BUMPRUN*を参照。
追加(P2 + free最適化, 2025-10-23 later)
- 変更点
- L2.5 page‑desc(64KBページ→{class, owner_tid})導入。hak_free_atでheaderless route
- L2.5 Transfer Cache(TC): freeは per-thread outboxへappend、閾値で一括remote‑flush
- same‑thread freeはTLSへ直帰(リング/LIFO)
- A/B(10s, Large 4T, remote, factor=4, shard‑mix=1)
- HDR=2 + TC_SPILL=16 → ~98.7k ops/s(最良)
- HDR=2 + TC_SPILL=32 → ~88.3k ops/s
- HDR=1 → ~79.0k ops/s
- 代表タイミング(HDR=2, SPILL=16)
- l25_get ≈ 2%(alloc側軽量化達成)
- hak_free ≈ 44%(free支配、ただし CAS はほぼ消失)
- 推奨プロファイル(Large 10s)
- P1:
L25_PREF=remote, L25_RUN_FACTOR=4, HDR_LIGHT=1, SHARD_MIX=1(~102k) - P2+TC:
L25_PREF=remote, L25_RUN_FACTOR=4, HDR_LIGHT=2, L25_TC_SPILL=16, SHARD_MIX=1(~99k)
- P1: