ClickHouse / ClickHouse/clickhouse-go
OOM in bumping clickhouse-go driver
- Dominant language
- Go
- Stars
- 3.3k
- Forks
- 680
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 14
Description
## 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
### 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](https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary
Contributor guide
Research direction
Start by reproducing the upgrade from clickhouse-go/v2.1.0 to v2.29.0 with the listed Go and ClickHouse versions, comparing memory profiles for the clickhouse-go and ch-go paths. Use the supplied profiling screenshots and environment details to isolate the regression; done means the memory increase and missing performance gain are explained or reduced to an actionable fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100