One big file that goes on forever?
No!!! Page faults, page cache churn, VM pressure, ...
Clean Dirty Active Header Header Message Message Header Header Message Message Header Header Message Message Tail Header Message Header Message
Do publishers need a CAS?
File Header Message 1 Header Message 2 Header Message 3 Tail <<XADD>> Message X Message Y
File Header Message 1 Header Message 2 Header Message 3 Message X Tail <<XADD>> Message Y
File Header Message 1 Header Message 2 Header Message 3 Message X Message Y Tail
File Header Message 1 Header Message 2 Header Message 3 Header Message X Message Y Tail
File Header Message 1 Header Message 2 Header Message 3 Header Message X Message Y Padding Tail
File File Tail Header Message 1 Header Message 2 Header Message 3 Header Message X Message Y Padding
File File Header Header Message 1 Message X Header Tail Message 2 Header Message 3 Header Message Y Padding
Have a background thread do zero’ing and flow control
Burst Length = 1: RTT (ns) Prod # Mean 99% 1 167 189 Baseline (Wait-free) 1 281 361 ConcurrentLinkedQueue 2 381 559 3 444 705 1 170 194 ManyToOneRingBuffer 2 256 279 3 283 340 1 192 210 Aeron IPC 2 251 286 3 290 342
Burst Length = 1: RTT (ns) Prod # Mean 99% 1 167 189 Baseline (Wait-free) 1 281 361 ConcurrentLinkedQueue 2 381 559 3 444 705 1 170 194 ManyToOneRingBuffer 2 256 279 3 283 340 1 192 210 Aeron IPC 2 251 286 3 290 342
Aeron Data Message Header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-------------------------------------------------------------+ |R| Frame Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+ | Version |B|E| Flags | Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+ |R| Term Offset | +-+-------------------------------------------------------------+ | Session ID | +---------------------------------------------------------------+ | Stream ID | +---------------------------------------------------------------+ | Term ID | +---------------------------------------------------------------+ | Encoded Message ... ... | +---------------------------------------------------------------+
Burst Length = 100: RTT (ns) Prod # Mean 99% 1 721 982 Baseline (Wait-free) 1 12,916 15,792 ConcurrentLinkedQueue 2 25,132 35,136 3 39,462 56,768 1 3,773 3,992 ManyToOneRingBuffer 2 11,286 13,200 3 27,255 34,432 1 4,436 4,632 Aeron IPC 2 7,623 8,224 3 10,825 13,872
Burst Length = 100: RTT (ns) Prod # Mean 99% 1 721 982 Baseline (Wait-free) 1 12,916 15,792 ConcurrentLinkedQueue 2 25,132 35,136 3 39,462 56,768 1 3,773 3,992 ManyToOneRingBuffer 2 11,286 13,200 3 27,255 34,432 1 4,436 4,632 Aeron IPC 2 7,623 8,224 3 10,825 13,872
Less “False Sharing” - Inlined data vs Reference Array Less “Card Marking”
Is avoiding the spinning “CAS” loop is a major step forward?
Burst Length = 100: RTT (ns) Prod # Mean 99% 1 721 982 Baseline (Wait-free) 1 12,916 15,792 ConcurrentLinkedQueue 2 25,132 35,136 3 39,462 56,768 1 3,773 3,992 ManyToOneRingBuffer 2 11,286 13,200 3 27,255 34,432 1 4,436 4,632 Aeron IPC 2 7,623 8,224 3 10,825 13,872
Recommend
More recommend