Skip to content

OOM in bumping clickhouse-go driver #1847

@ritikjain-zomato

Description

@ritikjain-zomato

Observed

  1. We were using the clickhouse-go/v2 v.2.1.0 and go version 1.22.0, we recently bumped to clickhouse-go/v.2.29.0 and tried go version 1.23.9 and 1.25.5. As soon as we deployed the changes the containers started to get OOM.
  2. On profiling this we saw that the v.2.29.0 internally uses ch-go which is taking significantly more memory than the v.2.1.0 which uses the clickhouse-go.

Expected behaviour

  1. As bumping the version it's expected that higher version to perform better, we have ingestion heavy system and for that ch-go is recommended but its using higher memory and we see almost no performance gain in workers cpu. Were is it expected to see the performance gain on using the higher version?

Details

Attaching the screenshot of the profiling

Image Image

Environment

  • clickhouse-go version: 2.29
  • Interface: ClickHouse API / database/sql compatible driver
  • Go version: 1.25.5
  • Operating system:
  • ClickHouse version: 25.10
  • Is it a ClickHouse Cloud? No
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for all these tables, use clickhouse-obfuscator if necessary

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions