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

# filesystem_cache_* session settings

> ClickHouse session settings in the filesystem_cache_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## filesystem\_cache\_allow\_background\_download

Type

Bool

Default

1

Allow filesystem cache to enqueue background downloads for data read from remote storage. Disable to keep downloads in the foreground for the current query/session.

## filesystem\_cache\_boundary\_alignment

Type

UInt64

Default

0

Filesystem cache boundary alignment. For non-disk read (e.g. for cache of remote table engines / table functions) value 0 means no alignment. For disk read (e.g. for MergeTree tables on a disk with cache) value 0 means that `boundary_alignment` from the cache configuration is used. The value is capped at `max_file_segment_size` of the cache.

## filesystem\_cache\_enable\_background\_download\_during\_fetch

Type

Bool

Default

1

Only has an effect in ClickHouse Cloud. Wait time to lock cache for space reservation in filesystem cache

## filesystem\_cache\_enable\_background\_download\_for\_metadata\_files\_in\_packed\_storage

Type

Bool

Default

1

Only has an effect in ClickHouse Cloud. Wait time to lock cache for space reservation in filesystem cache

## filesystem\_cache\_name

Filesystem cache name to use for stateless table engines or data lakes

## filesystem\_cache\_prefer\_bigger\_buffer\_size

Type

Bool

Default

1

Prefer bigger buffer size if filesystem cache is enabled to avoid writing small file segments which deteriorate cache performance. On the other hand, enabling this setting might increase memory usage.

## filesystem\_cache\_reserve\_space\_wait\_lock\_timeout\_milliseconds

Type

UInt64

Default

1000

Wait time to lock cache for space reservation in filesystem cache

## filesystem\_cache\_segments\_batch\_size

Type

UInt64

Default

20

Limit on size of a single batch of file segments that a read buffer can request from cache. Too low value will lead to excessive requests to cache, too large may slow down eviction from cache

## filesystem\_cache\_verbose\_logging

Type

Bool

Default

0

Emit `TEST`-level log messages for every filesystem cache buffer refill (state of the read, remaining size to read, bytes read). Only for debugging: the messages are formatted once per read, so enabling it on a query that does many small cached reads adds a large amount of logging overhead. The messages are only visible when the log level is `test` anyway (see `send_logs_level`).

## filesystem\_cache\_wait\_for\_concurrent\_download\_timeout\_milliseconds

Type

UInt64

Default

1000

Maximum time to wait for a file segment which is being downloaded to the filesystem cache by a concurrent query. When the timeout is reached, the read bypasses the filesystem cache for that range and reads directly from remote storage, while the concurrent download continues to fill the cache. Value `0` means do not wait at all: bypass the cache immediately if the needed range is not downloaded yet. Lowering this value bounds the tail latency of cache-hit reads which would otherwise wait for another query's download pace at the cost of additional requests to remote storage.
