> ## 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.

# memory_profiler_* 세션 설정

> memory_profiler_* 그룹에 생성된 ClickHouse 세션 설정입니다.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>유형</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>기본값</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          재시작 없이 변경 가능
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

이 설정은 [system.settings](/docs/ko/reference/system-tables/settings)에서 확인할 수 있으며 [소스 코드](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp)에서 자동으로 생성됩니다.

<div id="memory_profiler_sample_max_allocation_size">
  ## memory\_profiler\_sample\_max\_allocation\_size
</div>

<SettingsInfoBlock type="UInt64" default_value="0" />

지정된 값 이하 크기의 무작위 메모리 할당을 `memory_profiler_sample_probability`와 동일한 확률로 수집합니다. 0은 비활성화됨을 의미합니다. 이 임계값이 예상대로 작동하게 하려면 `max_untracked_memory`를 0으로 설정하는 것이 좋습니다.

<div id="memory_profiler_sample_min_allocation_size">
  ## memory\_profiler\_sample\_min\_allocation\_size
</div>

<SettingsInfoBlock type="UInt64" default_value="0" />

지정한 값 이상인 무작위 메모리 할당를 `memory_profiler_sample_probability`와 동일한 확률로 수집합니다. 0은 비활성화를 의미합니다. 이 임계값이 예상대로 작동하게 하려면 'max\_untracked\_memory'를 0으로 설정하는 것이 좋습니다.

<div id="memory_profiler_sample_probability">
  ## memory\_profiler\_sample\_probability
</div>

<SettingsInfoBlock type="Float" default_value="0" />

무작위 메모리 할당 및 해제를 수집하여 'MemorySample' trace\_type으로 system.trace\_log에 기록합니다. 이 확률은 할당 크기와 관계없이 모든 alloc/free에 적용됩니다(`memory_profiler_sample_min_allocation_size` 및 `memory_profiler_sample_max_allocation_size`로 변경할 수 있습니다). 샘플링은 추적되지 않은 메모리 양이 'max\_untracked\_memory'를 초과할 때만 수행됩니다. 더 세분화된 샘플링을 원하면 'max\_untracked\_memory'를 0으로 설정하는 것이 좋습니다.

<div id="memory_profiler_step">
  ## memory\_profiler\_step
</div>

<SettingsInfoBlock type="UInt64" default_value="4194304" />

메모리 프로파일러의 간격을 설정합니다. 쿼리 메모리 사용량이 바이트 수 기준으로 다음 간격을 넘을 때마다 메모리 프로파일러가 메모리 할당 stacktrace를 수집하여 [trace\_log](/docs/ko/reference/system-tables/trace_log)에 기록합니다.

가능한 값:

* 양의 정수 바이트 수

* 메모리 프로파일러를 끄려면 0
