@@ -24,24 +24,24 @@ function.
24
24
25
25
The optimal choice varies depending on your access patterns for the data. For
26
26
instance, in the Multi-Tenant SaaS Database use-case we recommend choosing
27
- between ** 32 - 128** shards. For smaller workloads say <100GB , you could start with
28
- 32 shards and for larger workloads you could choose 64 or 128. This means that
29
- you have the leeway to scale from 32 to 128 worker machines.
27
+ between ** 32 - 128** shards. For smaller workloads say <100 GB , you could start with
28
+ 32 shards and for larger workloads you could choose 64 or 128. This choice gives you
29
+ the leeway to scale from 32 to 128 worker machines.
30
30
31
31
### Real-time analytics use case
32
32
33
33
In the Real-Time Analytics use-case, shard count should be related to the total
34
- number of cores on the workers. To ensure maximum parallelism, you should
35
- create enough shards on each node such that there is at least one shard per CPU
36
- core. We typically recommend creating a high number of initial shards, e.g.
37
- ** 2x or 4x the number of current CPU cores** . This allows for future scaling if
38
- you add more workers and CPU cores.
34
+ number of cores on the workers. To ensure maximum parallelism, you should create
35
+ enough shards on each node such that there is at least one shard per CPU core.
36
+ We typically recommend creating a high number of initial shards, for example,
37
+ ** 2x or 4x the number of current CPU cores** . Having more shards allows for
38
+ * future scaling if you add more workers and CPU cores.
39
39
40
40
However, keep in mind that for each query Citus opens one database connection
41
41
per shard, and these connections are limited. Be careful to keep the shard
42
42
count small enough that distributed queries won’t often have to wait for a
43
43
connection. Put another way, the connections needed, `(max concurrent queries *
44
- shard count)`, should generally not exceed the total connections possible in the
44
+ shard count)`, shouldn't exceed the total connections possible in the
45
45
system, ` (number of workers * max_connections per worker) ` .
46
46
47
47
## Next steps
0 commit comments