Files
hakmem/docs/status/archive/PHASE_6.19_RESULTS_2025_10_23.md
Moe Charm (CI) 52386401b3 Debug Counters Implementation - Clean History
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>
2025-11-05 12:31:14 +09:00

2.3 KiB
Raw Blame History

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 4T64KB1MB, wrap=ON, timing=ON

  • 変更前ベストA/B: ~103,435 ops/s
  • bump-run既定: ~44,099 ops/sl25_get支配
  • bump-run + shard-mix: ~50,619 ops/sl25_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 pagedesc64KBページ→{class, owner_tid}導入。hak_free_atでheaderless route
    • L2.5 Transfer CacheTC: freeは per-thread outboxへappend、閾値で一括remoteflush
    • samethread freeはTLSへ直帰リング/LIFO
  • A/B10s, Large 4T, remote, factor=4, shardmix=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