Server Settings

Note

A value of `0` means all available CPUs will be used.

## tables\_loader\_foreground\_pool\_size[​](#tables_loader_foreground_pool_size "Direct link to tables_loader_foreground_pool_size")

Sets the number of threads performing load jobs in foreground pool. The foreground pool is used for loading table synchronously before server start listening on a port and for loading tables that are waited for. Foreground pool has higher priority than background pool. It means that no job starts in background pool while there are jobs running in foreground pool.

Note

A value of `0` means all available CPUs will be used.

## tcp\_close\_connection\_after\_queries\_num[​](#tcp_close_connection_after_queries_num "Direct link to tcp_close_connection_after_queries_num")

Maximum number of queries allowed per TCP connection before the connection is closed. Set to 0 for unlimited queries.

## tcp\_close\_connection\_after\_queries\_seconds[​](#tcp_close_connection_after_queries_seconds "Direct link to tcp_close_connection_after_queries_seconds")

Maximum lifetime of a TCP connection in seconds before it is closed. Set to 0 for unlimited connection lifetime.

## tcp\_port[​](#tcp_port "Direct link to tcp_port")

Port for communicating with clients over the TCP protocol.

**Example**

```
<tcp_port>9000</tcp_port>
```

## tcp\_port\_secure[​](#tcp_port_secure "Direct link to tcp_port_secure")

TCP port for secure communication with clients. Use it with [OpenSSL](#openssl) settings.

**Default value**

```
<tcp_port_secure>9440</tcp_port_secure>
```

## tcp\_ssh\_port[​](#tcp_ssh_port "Direct link to tcp_ssh_port")

Port for the SSH server which allows the user to connect and execute queries in an interactive fashion using the embedded client over the PTY.

Example:

```
<tcp_ssh_port>9022</tcp_ssh_port>
```

## temporary\_data\_in\_cache[​](#temporary_data_in_cache "Direct link to temporary_data_in_cache")

With this option, temporary data will be stored in the cache for the particular disk.
In this section, you should specify the disk name with the type `cache`.
In that case, the cache and temporary data will share the same space, and the disk cache can be evicted to create temporary data.

Note

Only one option can be used to configure temporary data storage: `tmp_path` ,`tmp_policy`, `temporary_data_in_cache`.

**Example**

Both the cache for `local_disk`, and temporary data will be stored in `/tiny_local_cache` on the filesystem, managed by `tiny_local_cache`.

```
<clickhouse>
<storage_configuration>
<disks>
<local_disk>
<type>local</type>
<path>/local_disk/</path>
</local_disk>

<!-- highlight-start -->
<tiny_local_cache>
<type>cache</type>
<disk>local_disk</disk>
<path>/tiny_local_cache/</path>
<max_size_rows>10M</max_size_rows>
<max_file_segment_size>1M</max_file_segment_size>
<cache_on_write_operations>1</cache_on_write_operations>
</tiny_local_cache>
<!-- highlight-end -->
</disks>
</storage_configuration>

<!-- highlight-start -->
<temporary_data_in_cache>tiny_local_cache</temporary_data_in_cache>
<!-- highlight-end -->
</clickhouse>
```

## temporary\_data\_in\_distributed\_cache[​](#temporary_data_in_distributed_cache "Direct link to temporary_data_in_distributed_cache")

Store temporary data in the distributed cache.

## text\_index\_header\_cache\_max\_entries[​](#text_index_header_cache_max_entries "Direct link to text_index_header_cache_max_entries")

Size of cache for text index header in entries. Zero means disabled.

## text\_index\_header\_cache\_policy[​](#text_index_header_cache_policy "Direct link to text_index_header_cache_policy")

Text index header cache policy name.

## text\_index\_header\_cache\_size[​](#text_index_header_cache_size "Direct link to text_index_header_cache_size")

Size of cache for text index headers. Zero means disabled.

Note

This setting can be modified at runtime and will take effect immediately.

## text\_index\_header\_cache\_size\_ratio[​](#text_index_header_cache_size_ratio "Direct link to text_index_header_cache_size_ratio")

The size of the protected queue (in case of SLRU policy) in the text index header cache relative to the cache's total size.

## text\_index\_postings\_cache\_max\_entries[​](#text_index_postings_cache_max_entries "Direct link to text_index_postings_cache_max_entries")

Size of cache for text index posting list in entries. Zero means disabled.

## text\_index\_postings\_cache\_policy[​](#text_index_postings_cache_policy "Direct link to text_index_postings_cache_policy")

Text index posting list cache policy name.

## text\_index\_postings\_cache\_size[​](#text_index_postings_cache_size "Direct link to text_index_postings_cache_size")

Size of cache for text index posting lists. Zero means disabled.

Note

This setting can be modified at runtime and will take effect immediately.

## text\_index\_postings\_cache\_size\_ratio[​](#text_index_postings_cache_size_ratio "Direct link to text_index_postings_cache_size_ratio")

The size of the protected queue (in case of SLRU policy) in the text index posting list cache relative to the cache's total size.

## text\_index\_tokens\_cache\_max\_entries[​](#text_index_tokens_cache_max_entries "Direct link to text_index_tokens_cache_max_entries")

Size of cache for text index tokens in entries. Zero means disabled.

## text\_index\_tokens\_cache\_policy[​](#text_index_tokens_cache_policy "Direct link to text_index_tokens_cache_policy")

Text index tokens cache policy name.

## text\_index\_tokens\_cache\_size[​](#text_index_tokens_cache_size "Direct link to text_index_tokens_cache_size")

Size of cache for text index tokens. Zero means disabled.

Note

This setting can be modified at runtime and will take effect immediately.

## text\_index\_tokens\_cache\_size\_ratio[​](#text_index_tokens_cache_size_ratio "Direct link to text_index_tokens_cache_size_ratio")

The size of the protected queue (in case of SLRU policy) in the text index tokens cache relative to the cache's total size.

## text\_log[​](#text_log "Direct link to text_log")

Settings for the [text\_log](/docs/operations/system-tables/text_log) system table for logging text messages.

The following settings can be configured by sub-tags: