説明
すべてのアリーナから集計した、jemalloc アロケータによる各サイズクラス (ビン) のメモリ割り当てに関する情報が含まれています。 jemalloc のスレッドローカルキャッシュの影響により、これらの統計は必ずしも完全に正確とは限りません。
カラム
index(UInt16) — サイズ順に並べたビンの索引。large(UInt8) — 大きな割り当ての場合はTrue、小さな割り当ての場合はFalse。size(UInt64) — このビン内の割り当てのサイズ。allocations(Int64) — 割り当て数。deallocations(Int64) — 解放数。nregs(Int64) — slabあたりのリージョン数。curslabs(Int64) — 現在のslab数。curregs(Int64) — このサイズクラスの現在のリージョン数。
別名:
availregs—nregs * curslabsの別名。util—curregs / availregsの別名。
例
現在のメモリ使用量全体に最も大きく寄与している割り当てのサイズを確認します。
SELECT
*,
allocations - deallocations AS active_allocations,
size * active_allocations AS allocated_bytes
FROM system.jemalloc_bins
WHERE allocated_bytes > 0
ORDER BY allocated_bytes DESC
LIMIT 10┌─index─┬─large─┬─────size─┬─allocactions─┬─deallocations─┬─active_allocations─┬─allocated_bytes─┐
│ 82 │ 1 │ 50331648 │ 1 │ 0 │ 1 │ 50331648 │
│ 10 │ 0 │ 192 │ 512336 │ 370710 │ 141626 │ 27192192 │
│ 69 │ 1 │ 5242880 │ 6 │ 2 │ 4 │ 20971520 │
│ 3 │ 0 │ 48 │ 16938224 │ 16559484 │ 378740 │ 18179520 │
│ 28 │ 0 │ 4096 │ 122924 │ 119142 │ 3782 │ 15491072 │
│ 61 │ 1 │ 1310720 │ 44569 │ 44558 │ 11 │ 14417920 │
│ 39 │ 1 │ 28672 │ 1285 │ 913 │ 372 │ 10665984 │
│ 4 │ 0 │ 64 │ 2837225 │ 2680568 │ 156657 │ 10026048 │
│ 6 │ 0 │ 96 │ 2617803 │ 2531435 │ 86368 │ 8291328 │
│ 36 │ 1 │ 16384 │ 22431 │ 21970 │ 461 │ 7553024 │
└───────┴───────┴──────────┴──────────────┴───────────────┴────────────────────┴─────────────────┘