You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon attempting to re-insert into Clickhouse, we noticed a heightened CPU usage attributed to (*batch).Append and (*batch).Send. As it stands, the current design integrates the construction and compression of the batch with its transmission. Consequently, each attempt to resend a batch mandates a fresh construction and compression execution, resulting in significant strains on CPU performance.
Even if we can call batch.Send(..) multiple times, the context.Context is shared, which prevents us to control timeout.
Solution
Decoupling of the two linked processes: the formation of a batch and its delivery.
Expected behaviour
The end goal is to enable the re-transmission of batches without the need for repetitive construction and compression operations.
Observed
Upon attempting to re-insert into Clickhouse, we noticed a heightened CPU usage attributed to
(*batch).Append
and(*batch).Send
. As it stands, the current design integrates the construction and compression of the batch with its transmission. Consequently, each attempt to resend a batch mandates a fresh construction and compression execution, resulting in significant strains on CPU performance.Even if we can call
batch.Send(..)
multiple times, thecontext.Context
is shared, which prevents us to control timeout.Solution
Decoupling of the two linked processes: the formation of a batch and its delivery.
Expected behaviour
The end goal is to enable the re-transmission of batches without the need for repetitive construction and compression operations.
Code example
Details
Profiling flamegraph:
Environment
clickhouse-go
version: v2.13.0database/sql
compatible driverCREATE TABLE
statements for tables involved: NoThe text was updated successfully, but these errors were encountered: