system.server_settings 시스템 테이블
system.server_settings 시스템 테이블
system.server_settings 는 config.xml 에 지정된 서버의 전역 설정에 대한 정보를 담고 있어요. 고정된 구조를 가진 지원되는 중첩 설정도 포함하고, 목록과 같은 동적 섹션은 포함하지 않아요.
출처: 문서
본문
ClickHouse Cloud에서의 조회 — 이 시스템 테이블의 데이터는 ClickHouse Cloud에서 각 노드에 로컬로 저장돼요. 따라서 모든 데이터의 완전한 뷰를 얻으려면 clusterAllReplicas 함수가 필요해요. 자세한 내용은 여기 를 참고하세요.
Description
config.xml 에 지정된 서버의 전역 설정에 대한 정보를 포함해요.
고정된 구조를 가진 지원되는 중첩 설정도 포함하며, 목록과 같은 동적 섹션은 포함하지 않아요.
Columns
-
name(String) — 서버 설정 이름이에요. -
value(String) — 서버 설정 값이에요. -
default(String) — 서버 설정 기본값이에요. -
changed(UInt8) — 설정이 config.xml 에 지정되었는지 여부를 보여줘요. -
description(String) — 짧은 서버 설정 설명이에요. -
type(String) — 서버 설정 값 유형이에요. -
changeable_without_restart(Enum8(‘No’ = 0, ‘IncreaseOnly’ = 1, ‘DecreaseOnly’ = 2, ‘Yes’ = 3)) — 설정을 런타임에 변경할 수 있는지 여부를 보여줘요. -
is_obsolete(UInt8) — 설정이 폐기되었는지 여부를 보여줘요.
Example
다음 예제는 이름에 thread_pool 이 포함된 서버 설정에 대한 정보를 얻는 방법을 보여줘요.
SELECT *
FROM system.server_settings
WHERE name LIKE '%thread_pool%'
┌─name──────────────────────────────────────────┬─value─┬─default─┬─changed─┬─description─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─type───┬─changeable_without_restart─┬─is_obsolete─┐
│ max_thread_pool_size │ 10000 │ 10000 │ 0 │ The maximum number of threads that could be allocated from the OS and used for query execution and background operations. │ UInt64 │ No │ 0 │
│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ The maximum number of threads that will always stay in a global thread pool once allocated and remain idle in case of insufficient number of tasks. │ UInt64 │ No │ 0 │
│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ The maximum number of tasks that will be placed in a queue and wait for execution. │ UInt64 │ No │ 0 │
│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ The maximum number of threads that would be used for IO operations │ UInt64 │ No │ 0 │
│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ No │ 0 │
│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ No │ 0 │
│ max_active_parts_loading_thread_pool_size │ 64 │ 64 │ 0 │ The number of threads to load active set of data parts (Active ones) at startup. │ UInt64 │ No │ 0 │
│ max_outdated_parts_loading_thread_pool_size │ 32 │ 32 │ 0 │ The number of threads to load inactive set of data parts (Outdated ones) at startup. │ UInt64 │ No │ 0 │
│ max_unexpected_parts_loading_thread_pool_size │ 32 │ 32 │ 0 │ The number of threads to load inactive set of data parts (Unexpected ones) at startup. │ UInt64 │ No │ 0 │
│ max_parts_cleaning_thread_pool_size │ 128 │ 128 │ 0 │ The number of threads for concurrent removal of inactive data parts. │ UInt64 │ No │ 0 │
│ max_backups_io_thread_pool_size │ 1000 │ 1000 │ 0 │ The maximum number of threads that would be used for IO operations for BACKUP queries │ UInt64 │ No │ 0 │
│ max_backups_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for backups IO thread pool. │ UInt64 │ No │ 0 │
│ backups_io_thread_pool_queue_size │ 0 │ 0 │ 0 │ Queue size for backups IO thread pool. │ UInt64 │ No │ 0 │
└───────────────────────────────────────────────┴───────┴─────────┴─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────┴─────────────┘
WHERE changed 를 사용하면 예를 들어 구성 파일의 설정이 올바르게 로드되어 사용 중인지 확인하고 싶을 때 유용할 수 있어요.
SELECT * FROM system.server_settings WHERE changed AND name='max_thread_pool_size'