Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocking send in Consume() causes a lot of goroutines to pile up #773

Open
blixt opened this issue Aug 24, 2023 · 0 comments
Open

Blocking send in Consume() causes a lot of goroutines to pile up #773

blixt opened this issue Aug 24, 2023 · 0 comments

Comments

@blixt
Copy link

blixt commented Aug 24, 2023

There's an app.dataChan channel – sent to by Consume() – which has a buffer of 200 items that is not configurable (const appDataChanSize = 200). In a service that receives up to a million RPM we see waits in Consume() accounting for ~50% of global blocking time.

In our case, we see these requests in bursts so just being able to increase the buffer size (at the cost of more static allocation) would help us reduce the amount of backed up goroutines (and thus reduce memory pressure from the stacks).

Alternatively, being able to turn on a behavior that does not wait for writes to become available could be useful. For example, auto-Ignore()-ing the transactions.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants