[
https://issues.apache.org/jira/browse/CASSGO-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18019350#comment-18019350
]
Bohdan Siryk commented on CASSGO-89:
------------------------------------
I've run a couple of benchmarks and spent some time profiling the driver. As a
result, I still didn't figure out if those changes brought any regression.
For each benchmark I just change the version of the gocql package in go.mod.
Benchmark:
```
func Benchmark_Proto4_QuerySelect(b *testing.B) {
cfg := gocql.NewCluster("172.20.0.2")
cfg.ProtoVersion = 4
session, err := cfg.CreateSession()
require.NoError(b, err)
defer session.Close()
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++
{ err := session.Query("SELECT id FROM gocql_test.test_table").Exec()
require.NoError(b, err) }
}```
I've run this benchmark for the following gocql version:
* v1.7.0 tag
* SHA
[63b6d7830710a0c6c5411c08bf16d38cb88d2a8a|https://github.com/apache/cassandra-gocql-driver/commit/63b6d7830710a0c6c5411c08bf16d38cb88d2a8a]
- CASSGO-1 commit, which presumably caused the regression
* SHA
[0aa180badfc90b8c3f1f4e4d2da457aef00e280b|https://github.com/apache/cassandra-gocql-driver/commit/0aa180badfc90b8c3f1f4e4d2da457aef00e280b]
- CASSGO-26 which is the previous commit
> Performance regression due to CASSGO-1 changes
> ----------------------------------------------
>
> Key: CASSGO-89
> URL: https://issues.apache.org/jira/browse/CASSGO-89
> Project: Apache Cassandra Go driver
> Issue Type: Task
> Components: Core
> Reporter: Bohdan Siryk
> Priority: Normal
>
> > Hey all. Trying to track down an issue, which is appearing when switching
> > the version of the Go driver. The team I'm working with has narrowed it
> > down to this
> > [commit|https://github.com/apache/cassandra-gocql-driver/commit/63b6d7830710a0c6c5411c08bf16d38cb88d2a8a#diff-4f427d2b022907c552328e63f137561f6de92396d7a6e8f6c2ea1bcf0db52654].
> > They bumped the driver version to that commit & pinned the protocol to
> > v4. They're seeing a massive increase in allocation and increased latency.
> > The memory allocation isn't actually coming from the driver, but rather
> > later in the stack where it creates a protobuf object. Based on the
> > network traffic, there's a lot more data coming back to the client than
> > there was before.
> Originally raised in
> [https://the-asf.slack.com/archives/C05LPRVNZV1/p1756169350344849]
> Potential regression due to changes brought by CASSGO-1
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]