-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
BatchEventProcessor.processEvents performance #429
Comments
I also wouldn't expect exceptions to be thrown as part of 'standard' operation, although that definition of 'standard' is quite detailed. One possibility is that you appear to be using a TimeoutBlockingWaitStrategy. That will use exceptions to get to L198-201 of BatchEventProcessor, when it sees a long enough duration where no events are available from the buffer. That's an interesting choice of wait strategy if you're after pure performance - do you do anything on timeout? If it's not that, can you capture exactly what exception it is? We may be able to advise a little better with that information. |
I could neither trace nor debug the raised exception. I did notice that Apache's log4j2 has re-implemented the I don't know where in the code the disruptor classes are being called from. I suspect they're called from an indirect dependency, such as log4j2. |
That comment on L53 of the link says:
It still throws a TimeoutException on L88 - it has to, or it breaks the contract of how timeouts are implemented in BatchEventProcessor. Is there anything else we can help with here? It feels like we are troubleshooting a performance issue based on an exception that's being raised (we think - we don't have any meaningful diagnostics, only a guess from me based on a profile with surprisingly few samples in it!) from a wait strategy which is deliberately not designed with throughput or latency in mind. |
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. |
While profiling a simple D-Bus-based application, I noticed the following:
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
:disruptor/src/main/java/com/lmax/disruptor/BatchEventProcessor.java
Line 156 in 305d737
The profile output shows:
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.
dbus-2.log
The text was updated successfully, but these errors were encountered: