Hi,

I try this morning to reproduce the behaviour, but I do not have sufficient
time to finish the test. I’ml not surprised by the described behaviour because
we are talking about GC.

GC are program written to save the brain of developper implying a permanent
overconsumption of the CPU. So GC are complex algorithms using most CPU and
impacting performances.

I’m remember: the execution of the GC were the only way to close TCP connexions
because in some cases the object provided by core.tcp() is not closed and the
connexion is not released. Without the GC execution, HAProxy reach the maximum
of available connexion, and the process were blocked. The flag forcing the GCC
is set only is we use a socket.

Maybe we try to include new option "tune.lua.forced-gc”.

br,
Thierry

—
Thierry Fournier
Web Performance & Security Expert
m: +33 6 68 69 21 85      | e: thierry.fourn...@ozon.io
w: http://www.ozon.io/    | b: http://blog.ozon.io/

> On 9 Jan 2020, at 06:25, Willy Tarreau <w...@1wt.eu> wrote:
> 
> Hi,
> 
> On Thu, Jan 02, 2020 at 04:36:58PM -0800, Sadasiva Gujjarlapudi wrote:
>> Hi,
>> We have observed (significant)request handling rate dropped if the TCP
>> sockets were used in `http-request` action.
>> Request handling rate recovered with slight increase in memory usage after
>> commenting the line in `hlua_socket_connect()`/hlua.c
>> `hlua->flags | HLUA_MUST_GC`
>> Doc: 
>> https://antiphishing.ozon.io/4/0@dIg8fWe3Pg0@uv152ypkX71_NyCG5u2ry1B654tGLFq2UKabFItkBLEp7NFIDiBuEUqAAogidiDiOGvMnTSTFK3ClXj9Ozc9-0FWyvq_z7qztGU6-WYKict5U8Wp-m3Gr7K1h-B9elAz@73c1dfb44abdfca30a93012148bd1e7ebfe3dee2
>> 
>> I want to add a param to `Socket:connect()` or add new method
>> `Socket:connect2()`.
>> to disable forced GC.
>> Any feedback is appreciated.
> 
> Interesting! CCing Thierry who's the one who knows this best. Thierry,
> please also have a look at Sada's follow up e-mail with his numbers and
> config. It looks like the GC is particularly aggressive here, and I don't
> know if this is really needed. Or maybe we could have a counter and only
> force it once every 100 times or so ?
> 
> thanks,
> Willy


Reply via email to