Also I just noticed, when I reload HAProxy in master worker mode with SIGUSR2, stats stop get updated for already established sessions. I need to reestablish the sessions in order to see stat updates.
Is this a desired behaviour? Or probably there is a way to fix this? Thanks! Regards, Sergey > On 20 Nov 2018, at 17:51, Willy Tarreau <w...@1wt.eu> wrote: > > On Tue, Nov 20, 2018 at 05:35:14PM +0300, Sergey Arlashin wrote: >> Hi Willy, >> >> Thank you for the answer. I checked contstats and I see it is actually >> working. HAProxy - 1.8.1. >> Even small requests are reflected in the traffic stats. > > Ah you're right, I completely forgot I addressed this two years ago > with this commit : > > commit def0d22cc54229072a8abb6a850e6805208790f5 > Author: Willy Tarreau <w...@1wt.eu> > Date: Tue Nov 8 22:03:00 2016 +0100 > > MINOR: stream: make option contstats usable again > > Quite a lot of people have been complaining about option contstats not > working correctly anymore since about 1.4. The reason was that one reason > for the significant performance boost between 1.3 and 1.4 was the ability > to forward data between a server and a client without waking up the stream > manager. And we couldn't afford to force sessions to constantly wake it > up given that most of the people interested in contstats are also those > interested in high performance transmission. > (...) > > It now forces the streams to wake up at least every 5 seconds to update > the counters. It's even documented for the option. Be careful that with a > large number of concurrent connections (hundreds of thousands) it can cause > an increase of CPU usage even when the connections are idle, just because > each of them will wake up every 5 seconds. But usually it's not a problem > if you're facing issues with jumps in stats. > > Great, I'm happy to have nothing to do and that something I did and did > not remember makes a user happy :-) > > Willy