Skip to content

Commit ff69357

Browse files
authored
Clarify FD limits for blocks storage (#3377)
Signed-off-by: Marco Pracucci <[email protected]>
1 parent c03547e commit ff69357

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/blocks-storage/production-tips.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ slug: production-tips
77

88
This page shares some tips and things to take in consideration when setting up a production Cortex cluster based on the blocks storage.
99

10+
## Ingester
11+
12+
### Ensure a high number of max open file descriptors
13+
14+
The ingester stores received series into per-tenant TSDB blocks. Both TSDB WAL, head and compacted blocks are composed by a relatively large number of files which gets loaded via mmap. This means that the ingester keeps file descriptors open for TSDB WAL segments, chunk files and compacted blocks which haven't reached the retention period yet.
15+
16+
If your Cortex cluster has many tenants or ingester is running with a long `-blocks-storage.tsdb.retention-period`, the ingester may hit the **`file-max` ulimit** (maximum number of open file descriptions by a process); in such case, we recommend increasing the limit on your system or enabling [shuffle sharding](../guides/shuffle-sharding.md).
17+
18+
The rule of thumb is that a production system shouldn't have the `file-max` ulimit below `65536`, but higher values are recommended (eg. `1048576`).
19+
1020
## Querier
1121

1222
### Ensure caching is enabled
@@ -53,6 +63,8 @@ The store-gateway heavily relies on caching both to speed up the queries and to
5363

5464
The store-gateway stores each block’s index-header on the local disk and loads it via mmap. This means that the store-gateway keeps a file descriptor open for each loaded block. If your Cortex cluster has many blocks in the bucket, the store-gateway may hit the **`file-max` ulimit** (maximum number of open file descriptions by a process); in such case, we recommend increasing the limit on your system or running more store-gateway instances with blocks sharding enabled.
5565

66+
The rule of thumb is that a production system shouldn't have the `file-max` ulimit below `65536`, but higher values are recommended (eg. `1048576`).
67+
5668
## Compactor
5769

5870
### Ensure the compactor has enough disk space

0 commit comments

Comments
 (0)