-
Notifications
You must be signed in to change notification settings - Fork 102
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
Reduce heap and GC overhead #84
Comments
We have merged and released #105 to reduce the number of allocations, we now rely on StringBuilders differently to achieve this. We can probably do even better, and your suggestion is still very much valid, but for now this was a low impact alternative for our customers that would work without any code changes. We have a some more work in the pipe, so hopefully we can reduce GC load even further. Thank you for your insight @deadok22 🙇 |
Hi @truthbk! Thanks for following up on this. I took a glance at #105 and I must say I fail to see how that change is a performance improvement in some aspects of it. Let me elaborate:
It seems the new version may incur considerably more load on the GC than the old one in some scenarios. I just realized what I referred to as the
Although more work is now parallelized and some work is loaded off the caller threads, I'm concerned with the extra synchronization, allocation, and heap overhead the new processing model incurs. What benchmarks were used for evaluating the new processing model and the changes in #105? |
Reduce heap and GC overhead by rendering packets on the caller threads and queuing byte arrays or byte buffers.
The messages are currently rendered to instances of
java.lang.String
and are queued up in StatsDSender. Rendering the packets on caller threads and queuingbyte[]
orByteBuffer
instances will:StatsDSender
thread and increase the throughputWe could also skip the intermediate
StringBuilder
representation and render straight toByteBuffer
.The text was updated successfully, but these errors were encountered: