-
Notifications
You must be signed in to change notification settings - Fork 408
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
Shutting down the Disruptor with pending events in the buffer causes high CPU usage #566
Milestone
Comments
brenuart
added a commit
to brenuart/logstash-logback-encoder
that referenced
this issue
Jul 10, 2021
Calling Disruptor#shutdown(timeout) while the buffer is not empty causes the disruptor to wait in a busy-loop consommuing a lot of CPU. Instead, wait during the grace period before asking the disruptor to shutdown immediately. Related issue: logfellow#566
brenuart
added a commit
to brenuart/logstash-logback-encoder
that referenced
this issue
Jul 10, 2021
Calling Disruptor#shutdown(timeout) while the buffer is not empty causes the disruptor to wait in a busy-loop consommuing a lot of CPU. Instead, wait during the grace period before asking the disruptor to shutdown immediately. Related issue: logfellow#566
brenuart
added a commit
to brenuart/logstash-logback-encoder
that referenced
this issue
Jul 10, 2021
Calling Disruptor#shutdown(timeout) while the buffer is not empty causes the disruptor to wait in a busy-loop consommuing a lot of CPU. Instead, wait during the grace period before asking the disruptor to shutdown immediately. Related issue: logfellow#566
brenuart
added a commit
to brenuart/logstash-logback-encoder
that referenced
this issue
Jul 10, 2021
Calling Disruptor#shutdown(timeout) while the buffer is not empty causes the disruptor to wait in a busy-loop consommuing a lot of CPU. Instead, wait during the grace period before asking the disruptor to shutdown immediately. Related issue: logfellow#566
brenuart
added a commit
to brenuart/logstash-logback-encoder
that referenced
this issue
Jul 10, 2021
Calling Disruptor#shutdown(timeout) while the buffer is not empty causes the disruptor to wait in a busy-loop consommuing a lot of CPU. Instead, wait during the grace period before asking the disruptor to shutdown immediately. Related issue: logfellow#566
philsttr
pushed a commit
that referenced
this issue
Jul 14, 2021
…ut (#565) * Add ability block with optional timeout when appending to async appenders * Wait for the buffer to drain before calling Disruptor#shutdown Calling Disruptor#shutdown(timeout) while the buffer is not empty causes the disruptor to wait in a busy-loop consumuing a lot of CPU. Instead, wait during the grace period before asking the disruptor to shutdown immediately. Fixes #559 Fixes #566 Fixes #569
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling
Disruptor#shutdown()
waits until all enqueued events are processed by all registered processors. This happens in a busy spin which causes a high CPU load (see https://github.com/LMAX-Exchange/disruptor/blob/3.4.4/src/main/java/com/lmax/disruptor/dsl/Disruptor.java#L451-L463).Instead the
AsyncDisruptorAppender
should implement its own graceful shutdown of the Disruptor with its own wait strategy then ask for an immediate shutdown of the Disruptor when the grace period is over.The text was updated successfully, but these errors were encountered: