-
Hey all! I've been messing around with IO Uring for a Redis rewrite I'm working on, and I've noticed that using SQPOLL causes a pretty Just wanted to ask the community, should I be using SQPOLL on network related tasks? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not surprised. People often think that SQPOLL is a "just make it better/faster/cooler" flag, but it's not. It was a trade off from day one, you bouncing caches, spending more CPU cycles, and now it lacks even more features a normal ring supports (e.g. DEFER_TASKRUN). My recommendation: try normal rings first, add all performance features when applicable, DEFER_TASKRUN, registered buffers, multishot, registered rings, and so on and so on. IFF you're happy how it performs and bored, try to use and fine tune SQPOLL, not expecting much from it. And don't forget to look for CPU utilisation, it might be wasting a lot of cycles of another core while you're not looking at it. |
Beta Was this translation helpful? Give feedback.
I'm not surprised. People often think that SQPOLL is a "just make it better/faster/cooler" flag, but it's not. It was a trade off from day one, you bouncing caches, spending more CPU cycles, and now it lacks even more features a normal ring supports (e.g. DEFER_TASKRUN).
My recommendation: try normal rings first, add all performance features when applicable, DEFER_TASKRUN, registered buffers, multishot, registered rings, and so on and so on. IFF you're happy how it performs and bored, try to use and fine tune SQPOLL, not expecting much from it. And don't forget to look for CPU utilisation, it might be wasting a lot of cycles of another core while you're not looking at it.