-
Notifications
You must be signed in to change notification settings - Fork 519
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
Dropping queue high memory usage #4141
Comments
Side note: |
The bounded queue uses |
This is an FS2 |
So, the other way around is to implement async-variant, right? |
I've been benchmarking otel4s BatchSpanProcessor.scala and noticed a heavy memory consumption.
One of the suspects is the dropping queue. Switching to
Queue.bounded
dropped memory usage by 30-40%.I added dropping queue to the benchmarks and run a few:
The dropping queue's normalized (per operation) allocation is 3x more than the bounded queue.
JFR data
Bounded queue:
Dropping queue:
Affected queues
The dropping queue is backed by the
AbstractQueue
. The circular buffer and bounded queue (concurrent-based variant) also useAbstractQueue
, so they should show heavy-memory usage symptoms, too.The text was updated successfully, but these errors were encountered: