croemmich
01/24/2024, 6:41 PMReadConnPool
{
HealthCheckInterval 30000
MaxIdleTime 3600000
MaxLifetime 1800000
MaxLifetimeJitter 300000
MaxOpenConns 20
MinOpenConns 20
}
croemmich
01/24/2024, 6:43 PMJoey
01/24/2024, 7:30 PMJoey
01/24/2024, 7:31 PMcroemmich
01/24/2024, 7:40 PMvroldanbet
01/25/2024, 9:39 AMFor cluster stability, Cockroach Labs recommends a minimum of 8 vCPUs , and strongly recommends no fewer than 4 vCPUs per node. In a cluster with too few CPU resources, foreground client workloads will compete with the cluster's background maintenance tasks. For more information, see capacity planning issues.
https://www.cockroachlabs.com/docs/stable/recommended-production-settings#connection-pooling
The total number of workload connections across all connection pools should not exceed 4 times the number of vCPUs in the cluster by a large amount.
vroldanbet
01/25/2024, 9:39 AM--datastore-revision-quantization-max-staleness-percent
, which is like a jitter, but for the quantization window. It's set by default to 10%, but increasing it can help a lot. If you set it to 100%, your max staleness can go from 5s to 10s, so only set it if that's acceptable to you. If you have more staleness headroom, consider increasing the quantization window itself.
I also recommend running the latest version of SpiceDB 1.29.0 and enable --enable-experimental-watchable-schema-cache
. Set the heartbeat to something like 2s
. That will eliminate quite many queries from the database and thus reduce contention from the connection pools.croemmich
01/25/2024, 5:36 PMJoey
01/25/2024, 5:50 PMJoey
01/25/2024, 5:51 PMvroldanbet
01/25/2024, 6:06 PMvroldanbet
01/25/2024, 6:07 PMcroemmich
01/25/2024, 6:19 PMvroldanbet
01/25/2024, 6:40 PMvroldanbet
01/25/2024, 6:40 PMvroldanbet
01/25/2024, 6:40 PMvroldanbet
01/25/2024, 6:41 PMvroldanbet
01/25/2024, 6:43 PMvroldanbet
01/25/2024, 6:44 PMvroldanbet
01/25/2024, 6:44 PMcroemmich
01/25/2024, 6:44 PMvroldanbet
01/25/2024, 6:44 PMcroemmich
01/25/2024, 6:45 PMcroemmich
01/25/2024, 6:46 PMvroldanbet
01/25/2024, 6:46 PMvroldanbet
01/25/2024, 6:47 PMvroldanbet
01/25/2024, 6:47 PMvroldanbet
01/25/2024, 6:47 PMvroldanbet
01/25/2024, 6:48 PMvroldanbet
01/25/2024, 6:48 PMvroldanbet
01/25/2024, 6:49 PMvroldanbet
01/25/2024, 6:50 PMcroemmich
01/25/2024, 6:52 PMvroldanbet
01/25/2024, 6:53 PM