tempesta-tech / tempesta

All-in-one solution for high performance web content delivery and advanced protection against DDoS and web attacks
https://tempesta-tech.com/
GNU General Public License v2.0
622 stars 103 forks source link

Rework the work queue from MPMC to MPSC #2134

Open krizhanovsky opened 5 months ago

krizhanovsky commented 5 months ago

The current MPMC lock-free queue is a nice engineering, but we always use per-cpu queues to push a work to a particular CPU, i.e. we use only MPSC case. MPMC queue has more synchronization overhead on atomics, so we should rework the queue to MPSC.

krizhanovsky commented 1 month ago

The task is easy to do since it's mostly about code simplification and improves performance for the core transport for network IO