Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/consumoor-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Common causes of startup failure:

### Vertical Scaling

- Increase `maxConns` to allow more concurrent ClickHouse writes (default: 8)
- Increase `maxConns` to allow more concurrent ClickHouse writes (default: 32)
- Increase `batchSize` to write more rows per INSERT (default: 200000)
- Increase `bufferSize` to absorb more backpressure spikes (default: 200000), at the cost of higher memory usage
- Increase pod CPU/memory to handle more concurrent table writers
Expand All @@ -280,7 +280,7 @@ Common causes of startup failure:
| `flushInterval` | `clickhouse.defaults.flushInterval` | 1s | Decrease for lower latency; increase if batches are too small |
| `bufferSize` | `clickhouse.defaults.bufferSize` | 200000 | Increase to absorb ClickHouse hiccups without backpressure; decrease to limit memory |
| `commitInterval` | `kafka.commitInterval` | 5s | Decrease to reduce duplicate replay window on crash; increase to reduce Kafka commit overhead |
| `maxConns` | `clickhouse.chgo.maxConns` | 8 | Increase when `chgo_pool_empty_acquire_total` is high |
| `maxConns` | `clickhouse.chgo.maxConns` | 32 | Increase when `chgo_pool_empty_acquire_total` is high |
| `queryTimeout` | `clickhouse.chgo.queryTimeout` | 30s | Increase if large batches legitimately take longer to insert |
| `maxRetries` | `clickhouse.chgo.maxRetries` | 3 | Increase if transient ClickHouse errors are frequent but recover quickly |
| `deliveryMode` | `kafka.deliveryMode` | batch | Use `message` for safer per-message delivery; use `batch` for higher throughput |
Expand Down
2 changes: 1 addition & 1 deletion example_consumoor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ clickhouse:
# maxRetries: 3
# retryBaseDelay: 100ms
# retryMaxDelay: 2s
# maxConns: 8
# maxConns: 32
# minConns: 1
# connMaxLifetime: 1h
# connMaxIdleTime: 10m
Expand Down
2 changes: 1 addition & 1 deletion pkg/consumoor/clickhouse/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type ChGoConfig struct {
RetryMaxDelay time.Duration `yaml:"retryMaxDelay" default:"2s"`

// MaxConns is the maximum number of pooled ClickHouse connections.
MaxConns int32 `yaml:"maxConns" default:"8"`
MaxConns int32 `yaml:"maxConns" default:"32"`
// MinConns is the minimum number of pooled ClickHouse connections.
MinConns int32 `yaml:"minConns" default:"1"`
// ConnMaxLifetime is the maximum lifetime for pooled connections.
Expand Down
2 changes: 1 addition & 1 deletion pkg/consumoor/clickhouse/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func validChGoConfig() ChGoConfig {
MaxRetries: 3,
RetryBaseDelay: 100 * time.Millisecond,
RetryMaxDelay: 2 * time.Second,
MaxConns: 8,
MaxConns: 32,
MinConns: 1,
ConnMaxLifetime: 1 * time.Hour,
ConnMaxIdleTime: 10 * time.Minute,
Expand Down
4 changes: 2 additions & 2 deletions pkg/consumoor/clickhouse/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestChGoConfigValidateAcceptsValidConfig(t *testing.T) {
ReadTimeout: 30 * time.Second,
RetryBaseDelay: 100 * time.Millisecond,
RetryMaxDelay: 2 * time.Second,
MaxConns: 8,
MaxConns: 32,
MinConns: 0,
ConnMaxLifetime: time.Hour,
ConnMaxIdleTime: 10 * time.Minute,
Expand Down Expand Up @@ -421,7 +421,7 @@ func TestBufferWarningThresholdValidation(t *testing.T) {
ReadTimeout: 30 * time.Second,
RetryBaseDelay: 100 * time.Millisecond,
RetryMaxDelay: 2 * time.Second,
MaxConns: 8,
MaxConns: 32,
MinConns: 1,
ConnMaxLifetime: time.Hour,
ConnMaxIdleTime: 10 * time.Minute,
Expand Down
2 changes: 1 addition & 1 deletion pkg/consumoor/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func validChGoConfig() clickhouse.ChGoConfig {
MaxRetries: 3,
RetryBaseDelay: 100 * time.Millisecond,
RetryMaxDelay: 2 * time.Second,
MaxConns: 8,
MaxConns: 32,
MinConns: 1,
ConnMaxLifetime: time.Hour,
ConnMaxIdleTime: 10 * time.Minute,
Expand Down
Loading