scylladb / scylla-bench

43 stars 36 forks source link

increase result channel size to prevent latency spike in one go routi… #77

Closed dulithag closed 2 years ago

dulithag commented 2 years ago

…ne from slowing down all go routines

dulithag commented 2 years ago

result collector iterates over all channels and pulls results from channel making more room for next result. When running queries with large payload I observed a slow down in a single thread's query causes latency to propagate to other threads since they are waiting to push result to already filled channel.

dulithag commented 2 years ago

This implementation maintains order of results and is a simple fix. A better implementation would be to use a single channel owned by result collector. All go routines will push results to this single channel. In such an implementation order cannot be guaranteed.