Skip to content

Reuse grpc buffer in querier's store-gateway stream#7519

Draft
eeldaly wants to merge 2 commits into
cortexproject:masterfrom
eeldaly:querier-grpc
Draft

Reuse grpc buffer in querier's store-gateway stream#7519
eeldaly wants to merge 2 commits into
cortexproject:masterfrom
eeldaly:querier-grpc

Conversation

@eeldaly
Copy link
Copy Markdown
Contributor

@eeldaly eeldaly commented May 14, 2026

What this PR does:
Reuse grpc buffer in querier's store-gateway stream to reduce memory usage in large queries

GRPC Store-Gateway Bench Test NEW:

BenchmarkGrpcStoreGatewayCalls-10    	    1501	    929363 ns/op	   59943 B/op	     455 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1723	    693808 ns/op	   49132 B/op	     456 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1818	    649024 ns/op	   49703 B/op	     454 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1516	    949340 ns/op	   46230 B/op	     453 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1765	    710793 ns/op	   50579 B/op	     453 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1670	    658193 ns/op	   50318 B/op	     458 allocs/op

GRPC Store-Gateway Bench Test OLD:

BenchmarkGrpcStoreGatewayCalls-10    	    1869	    717663 ns/op	  553930 B/op	     482 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1275	    849913 ns/op	  561863 B/op	     477 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1290	    834707 ns/op	  567643 B/op	     478 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1356	   1100831 ns/op	  560738 B/op	     477 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1146	   1179173 ns/op	  573945 B/op	     477 allocs/op
BenchmarkGrpcStoreGatewayCalls-10    	    1335	    875292 ns/op	  556640 B/op	     481 allocs/op

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

way stream

Signed-off-by: Essam Eldaly <eeldaly@amazon.com>
Signed-off-by: Essam Eldaly <eeldaly@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant