설명
모든 arena에서 집계한 서로 다른 크기 클래스(bin)별 jemalloc 메모리 할당자를 통한 메모리 할당 정보를 포함합니다. 이 통계는 jemalloc의 스레드 로컬 캐싱 때문에 완전히 정확하지 않을 수 있습니다.
컬럼
index(UInt16) — 크기순으로 정렬된 빈의 인덱스입니다.large(UInt8) — 큰 메모리 할당이면 True, 작으면 False입니다.size(UInt64) — 이 빈에 속하는 메모리 할당의 크기입니다.allocations(Int64) — 메모리 할당 횟수입니다.deallocations(Int64) — 메모리 할당 해제 횟수입니다.nregs(Int64) — 슬랩당 영역 수입니다.curslabs(Int64) — 현재 슬랩 수입니다.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 │
└───────┴───────┴──────────┴──────────────┴───────────────┴────────────────────┴─────────────────┘