Hello,

On Thu, Oct 17, 2019 at 02:11:19PM +0200, Gaetan Deputier wrote:
> Hello!
> 
> I'm reaching out regarding the contstats option and "small performance
> drop". What is exactly the performance drop described here? Induced
> latency, CPU usage?
> 
> >From what I've seen, it triggers a recount on each session every 5s, so I'd
> expect a small CPU increase times the number of opened sessions but I have
> not found any resources aside the source code about contstats downsides.

A long time ago, when the notice was written, each I/O transfer would
trigger a wakeup of process_stream() when this was enabled, resulting in
an important performance loss since analysers had to be evaluated again.
When we later implemented the fast forwarding without going through
process_stream() we simply broke contstats. Much later it was fixed by
this 5s timer which sounded reasonable. Now I'd say that the CPU impact
is much less visible than what it used to be if each connection only
wakes it up every 5s, but if you have 1 million concurrent connections,
that's still 200k extra calls per second to deal with, thus it can
remain noticeable on large numbers of connections.

With HTTP there's little use of contstats, except for the few download
sites which transfer large images. But even then, when you have large
images in general you have a lot of traffic and on average everything
is smooth enough. The most common case for requiring contstats is long
sessions with limited traffic like remote desktops. But these ones are
not *that* common.

Willy

Reply via email to