BatchEventProcessor.processEvents performance
See original GitHub issueWhile profiling a simple D-Bus-based application, I noticed the following:
1764406 2.74% 1 OptoRuntime::handle_exception_C_helper(JavaThread*, nmethod*&)
The application is not in any failure scenario, so I would have expected that all messages could be processed without throwing exceptions. The exception handling is inside processEvents
:
The profile output shows:
--- 2116394 ns (3.28%), 1 sample
[ 0] exit_to_usermode_loop_[k]
[ 1] prepare_exit_to_usermode_[k]
[ 2] swapgs_restore_regs_and_return_to_usermode_[k]
[ 3] OptoRuntime::handle_exception_C_helper(JavaThread*, nmethod*&)
[ 4] OptoRuntime::handle_exception_C(JavaThread*)
[ 5] com.lmax.disruptor.BatchEventProcessor.processEvents
[ 6] com.lmax.disruptor.BatchEventProcessor.run
[ 7] java.lang.Thread.run
I don’t know what particular exception is causing the exception catch clause to be invoked, if any, or if there’s anything that can be changed to improve the performance. Feel free to close if nothing practical can be done.
The full async-profile log is attached.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
LMAX Disruptor User Guide
The LMAX Disruptor is a high performance inter-thread messaging library. ... There is a single representation called BatchEventProcessor that contains an ...
Read more >BatchEventProcessor (Disruptor) - javadoc.io
Convenience class for handling the batching semantics of consuming entries from a RingBuffer and delegating the available events to an EventHandler . If...
Read more >Re: Log4j2 Async Logging with LMAX Disruptor
Any appenders or filters that could be a performance bottleneck? ... processEvents() > BatchEventProcessor.java:168 > com.lmax.disruptor.
Read more >"Appender JDAAppender" Error - High Performance Minecraft
The error appears when starting up the server and when I use the /list command of EssentialsX, but I don't know if it...
Read more >Getting lots of context canceled - internal error in APM server ...
You may need to tune the APM Server performance and/or reduce the sampling rate to reduce ... processEvents(BatchEventProcessor.java:168)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also, in case I haven’t made it clear: that timeout exception is thrown when a ringbuffer consumer sees no events for a configured amount of time. We could probably rename all the timeout parts as “onTemporarilyIdle” or similar.
That rather suggests that the thread in question is probably not of that much interest to your profile anyway.
Closing as not applicable.