mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 11:24:44 -07:00
There was an observed degradation (around 5%) for large fan out in v2.9.0 compared to earlier release. This is because we added accounting of the in/out messages for the account, which result in 4 atomic operations, 2 for in and 2 for out, however, it means that for a fan-out of say 100 matching subscriptions, it is now 2 + 2 * 100 = 202. This PR rework how the stats accounting is done which removes the regression and even boost a bit the numbers since we are doing the server stats update as an aggregate too. There are still degradation for queues and no-sub at all that need to be looked at. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
94 KiB
94 KiB