ClickHouse/docs/en/operations/system-tables/server_settings.md
2023-02-24 10:18:06 -05:00

3.0 KiB

slug
/en/operations/system-tables/server_settings

server_settings

Contains information about global settings for the server, which were specified in config.xml. Currently, the table shows only settings from the first layer of config.xml and doesn't support nested configs (e.g. logger).

Columns:

  • name (String) — Server setting name.
  • value (String) — Server setting value.
  • default (String) — Server setting default value.
  • changed (UInt8) — Shows whether a setting was specified in config.xml
  • description (String) — Short server setting description.
  • type (String) — Server setting value type.

Example

The following example shows how to get information about server settings which name contains thread_pool.

SELECT *
FROM system.server_settings
WHERE name LIKE '%thread_pool%'
┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐
│ max_thread_pool_size         │ 5000  │ 10000   │       1 │ Max size for global thread pool.      │ UInt64 │
│ max_thread_pool_free_size    │ 1000  │ 1000    │       0 │ Max free size for global thread pool. │ UInt64 │
│ thread_pool_queue_size       │ 10000 │ 10000   │       0 │ Queue size for global thread pool.    │ UInt64 │
│ max_io_thread_pool_size      │ 100   │ 100     │       0 │ Max size for IO thread pool.          │ UInt64 │
│ max_io_thread_pool_free_size │ 0     │ 0       │       0 │ Max free size for IO thread pool.     │ UInt64 │
│ io_thread_pool_queue_size    │ 10000 │ 10000   │       0 │ Queue size for IO thread pool.        │ UInt64 │
└──────────────────────────────┴───────┴─────────┴─────────┴───────────────────────────────────────┴────────┘

Using of WHERE changed can be useful, for example, when you want to check whether settings in configuration files are loaded correctly and are in use.

SELECT * FROM system.server_settings WHERE changed AND name='max_thread_pool_size'

See also