> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> 与 `system.jemalloc_bins` 相同，但每个 (arena, bin) 组合对应一行，而不是跨各个 arena 聚合。Slab 只属于单个 arena，因此该表可将内存碎片定位到具体的 arena（包括专用于 `MergeTree` metadata、JIT 和 cache 的 arena），并可按 `arena` 和 大小类 与 `system.jemalloc_sampled_allocations` 进行连接。

# system.jemalloc_arena_bins

## 说明

与 `system.jemalloc_bins` 相同，但每个 (arena, bin) 组合各占一行，而非跨 arena 聚合。Slab 只归属于单个 arena，因此该表能将内存碎片定位到具体的 arena (包括专用的 `MergeTree` metadata、JIT 和 cache arena) ，并可按 `arena` 和 大小类 两个维度与 `system.jemalloc_sampled_allocations` 进行连接。

## 列

* `arena` ([UInt32](/docs/zh/reference/data-types/int-uint)) — arena 的索引。与 `system.jemalloc_sampled_allocations.arena` 连接。
* `purpose` ([String](/docs/zh/reference/data-types/string)) — 专用长生命周期 arena 的用途：'mergetree' (part 与表 metadata) 、'jit'、'cache'。通用 arena 此列为空。专用 arena 按设计即持有长生命周期的内存分配；碎片化报告通常会将其排除。
* `index` ([UInt16](/docs/zh/reference/data-types/int-uint)) — 按大小排序的 bin 的索引。
* `large` ([UInt8](/docs/zh/reference/data-types/int-uint)) — 大分配为 True，小分配为 False。
* `size` ([UInt64](/docs/zh/reference/data-types/int-uint)) — 该 bin 中分配的大小。
* `allocations` ([Int64](/docs/zh/reference/data-types/int-uint)) — 分配次数。
* `deallocations` ([Int64](/docs/zh/reference/data-types/int-uint)) — 释放次数。
* `nregs` ([Int64](/docs/zh/reference/data-types/int-uint)) — 每个 slab 中的 region 数量。
* `curslabs` ([Int64](/docs/zh/reference/data-types/int-uint)) — 当前 slab 数量。
* `curregs` ([Int64](/docs/zh/reference/data-types/int-uint)) — 该大小类当前的 region 数量。
* `slab_size` ([UInt64](/docs/zh/reference/data-types/int-uint)) — 每个 slab 的大小 (字节) 。大大小类不基于 slab，因此为零。
* `nonfull_slabs` ([Int64](/docs/zh/reference/data-types/int-uint)) — 当前至少包含一个空闲 region 的 slab 数量。大大小类为零。

**别名：**

* `availregs` — `nregs * curslabs` 的别名。
* `util` — `curregs / availregs` 的别名。
* `waste` — `greatest((curslabs * slab_size) - (curregs * size), 0)` 的别名。
