Closed 9268 closed 2 months ago
ClickHouse local version 24.3.2.23 (official build)
by increase max_samples_per_send,i got batter insert freq
remote_write:
- url: http://:9131/write
remote_timeout: 120s
queue_config:
max_samples_per_send: 50000
- url: http://:9131/write
remote_timeout: 120s
queue_config:
max_samples_per_send: 50000
@9268 Thanks for the report! Is your graph showing a decrease in rate(write_requests_total)
? (same rate(samples_written_total)
but fewer writes to clickhouse?)
I've opened pull request #12 to add a note in the README about your findings, I agree that adjusting capacity
and max_samples_per_send
as per Remote Write Tuning is probably necessary in production environments.
Adjusting remote_timeout
should not be necessary -- we should respond pretty quickly even if this does start happening.
Good to keep an eye on prometheus_remote_storage_samples_pending
suddenly growing, or if prometheus_remote_storage_samples_failed_total
starts showing completely dropped samples.
Even on my hobby instance, adjusting max_samples_per_send shows nice benefits.
Some metrics to take a look at while adjusting:
rate(write_requests_total[5m])
rate(ClickHouseProfileEvents_MergedRows[30m])
ClickHouseMetrics_PartsCompact + ClickHouseMetrics_PartsWide
With the added notes in #12 , I think we're good, thanks!
db create sql
using latest version and get error when clickhouse on high load, err msg is as follow:
no idea about this issue
I checked and found the issues on clickhouse, we should lower insert freq to 1 insert per second to avoid this issue? https://github.com/ClickHouse/ClickHouse/issues/3174