0

Using LMAX Disruptor,we have observed that if we use like 5-10 disruptors together in an application (sort of like a chain of disruptors with every disruptor having one consumer on it performing a specified task and then handing over the message to the next disruptor/ ringbuffer), What happens is the CPU utilization reaches 90% and above and system becomes unresponsive until we bring down the application, We feel it's because of so many active disruptor threads. This happens even when the disruptors are not really processing anything. Can anyone comment on as to what should be the optimum number of disruptors to be used in an application?

NiksP
  • 69
  • 1
  • 9

1 Answers1

1

It could be that you need to change the wait strategies you are using on the consumers. If you are using the busy-wait strategy on all of them, even if no inputs have been provided to the ring buffers, the polling threads could still tie up CPU resources because they'll be in tight loops where they're constantly checking the buffer for new values to read.

Andrew Bissell
  • 2,827
  • 2
  • 14
  • 19