Graylog2 / Graylog2/graylog2-server
High CPU usage on full input buffer
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
If the input buffer gets full, all the producers are busy looping when trying to call `publishEvent()`
In my case that leads to all CPUs being 100% busy.
The code in question always had the following TODO:
`LockSupport.parkNanos(1); // TODO, should we spin based on the wait strategy?`
https://github.com/LMAX-Exchange/disruptor/blob/v3.4/src/main/java/com/lmax/disruptor/MultiProducerSequencer.java#L136
And just like the TODO suggests, changing our default wait strategy from `BlockingWaitStrategy` to `SleepingWaitStrategy` has no effect on that issue.
It looks like this PR would solve that problem for us:
https://github.com/LMAX-Exchange/disruptor/pull/356
Contributor guide
Assessment
This issue has not been assessed yet.