Opened 3 years ago

Last modified 3 years ago

#2274 new enhancement

Replace NTCPFinisher ThreadPool with Disruptor

Reported by: Zlatin Balevsky Owned by:
Priority: minor Milestone: undecided
Component: router/transport Version: 0.9.34
Keywords: ntcp nio disruptor Cc:
Parent Tickets: Sensitive: no


Profiling with YourKit shows that 20% of the time the EventPumper thread is not sleep()-ing it is blocked on the LBQ of the ThreadPoolExecutor inside NTCPFinisher.

This is a perfect use case for a Disruptor ring because only one thread is putting items in that queue.


Attachments (1)

ntcpfinisher.png (246.8 KB) - added by Zlatin Balevsky 3 years ago.
EventPumper? cpu usage (multiply by 10)

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by Zlatin Balevsky

Attachment: ntcpfinisher.png added

EventPumper? cpu usage (multiply by 10)

comment:1 Changed 3 years ago by Zlatin Balevsky

As expected migrating to Disruptor eliminates the time spent in the LBQ, and all that EventPumper does is either sleep() or do i/o, as is desired (this is with patch #2264)

comment:2 Changed 3 years ago by zzz

Related: #2271
see that ticket for general disruptor comments

Note: See TracTickets for help on using tickets.