It’s coroutines, with thread pools. Thread pool is a fairly straight forward work stealing queue. The coroutines reduce busy wait (polling). SPSC loc free power of 2 bounded queue for mailbox communication. There is a single consumer thread and a single IO thread. A buffer pool of free, full (ready to write) buffers and an active buffer.

For previous versions I was using a MPMC lock free power of two bounded queue. The busy wait, and cache ping pong due to the atomics in the queue implementation was challenging to control.

With coroutines and TP the producers are mapped to fewer threads on the TP and yield instead of polling and exponential back off etc. the CPU utilization is now for real work.

The throughput should be limited by IO, earlier it was limited at the CPU level.

Next, I …

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help