userver
userver copied to clipboard
Update moodycamel to control MAX_SEMA_SPINS
You see, moodycamel::BlockingConcurrentQueue
spins here before going to kernel semaphore
and although it's preferable for maximum throughput in benchmarks,
it wastes CPU cycles in some real-life scenarios.
Since this commit there is a way to control this spinning behavior, which was very noticeable in some perfs, remember @apolukhin?
We've updated the moodycamel.
Now we have three different opinions on MAX_SEMA_SPINS proper value: 0|1, 16, default|10000. We need to do some experiments on production service...
We've updated the moodycamel.
Now we have three different opinions on MAX_SEMA_SPINS proper value: 0|1, 16, default|10000. We need to do some experiments on production service...
I feel more like ~1000, but that is based purely on feeling.
This definitely requires some experementation, but having a possibility to control that is already a pleasant enhancement, thank you for that!
I'll close this for now. Experiments with MAX_SEMA_SPINS would be done in a few months