> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 모든 arena에서 집계된, jemalloc 메모리 할당자의 여러 크기 클래스(bin)에서 수행된 메모리 할당 정보를 포함하는 시스템 테이블입니다.

# system.jemalloc_bins

<Info>
  **ClickHouse Cloud에서 쿼리하기**

  이 시스템 테이블의 데이터는 ClickHouse Cloud의 각 노드에 로컬로 저장됩니다. 따라서 전체 데이터를 모두 확인하려면 `clusterAllReplicas` 함수를 사용해야 합니다. 자세한 내용은 [여기](/ko/reference/system-tables/overview#system-tables-in-clickhouse-cloud)를 참조하십시오.
</Info>

<div id="description">
  ## 설명
</div>

모든 arena에서 집계한 서로 다른 크기 클래스(bin)별 jemalloc 메모리 할당자를 통한 메모리 할당 정보를 포함합니다.
이 통계는 jemalloc의 스레드 로컬 캐싱 때문에 완전히 정확하지 않을 수 있습니다.

<div id="columns">
  ## 컬럼
</div>

* `index` ([UInt16](/ko/reference/data-types)) — 크기순으로 정렬된 빈의 인덱스입니다.
* `large` ([UInt8](/ko/reference/data-types)) — 큰 할당인 경우 True, 작은 할당인 경우 False입니다.
* `size` ([UInt64](/ko/reference/data-types)) — 이 빈의 할당 크기입니다.
* `allocations` ([Int64](/ko/reference/data-types)) — 할당 횟수입니다.
* `deallocations` ([Int64](/ko/reference/data-types)) — 할당 해제 횟수입니다.
* `nregs` ([Int64](/ko/reference/data-types)) — 슬랩당 영역 수입니다.
* `curslabs` ([Int64](/ko/reference/data-types)) — 현재 슬랩 수입니다.
* `curregs` ([Int64](/ko/reference/data-types)) — 이 크기 클래스의 현재 영역 수입니다.

<div id="example">
  ## 예시
</div>

현재 전체 메모리 사용량에 가장 크게 기여한 메모리 할당의 크기를 확인합니다.

```sql theme={null}
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
```

```text theme={null}
┌─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 │
└───────┴───────┴──────────┴──────────────┴───────────────┴────────────────────┴─────────────────┘
```
