Hi,
Here are the metrics:

Forced GC:
requests/sec  5748.5842
$time haproxy
  real 0m17.051s
  user 0m1.654s
  sys 0m1.281s

Disabled forced GC:
requests/sec 9077.5050
$time haproxy
  real 0m18.330s
  user 0m0.781s
  sys 0m0.998s

Number of requests: 20000
Concurrency: 50

$uname -a
Linux hostname 5.4.8-arch1-1 #1 SMP PREEMPT Sat, 04 Jan 2020 23:46:18
+0000 x86_64 GNU/Linux

$haproxy -vv
HA-Proxy version 2.1.1-5cd8de-10 2019/12/19 - https://haproxy.org/
Status: stable branch - will stop receiving fixes around Q1 2021.
Known bugs: http://www.haproxy.org/bugs/bugs-2.1.1.html
Build options :
  TARGET  =
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement
-fwrapv -Wno-address-of-packed-member -Wno-unused-label
-Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration
-Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers
-Wno-implicit-fallthrough -Wno-stringop-overflow
-Wno-cast-function-type -Wtype-limits -Wshift-negative-value
-Wshift-overflow=2 -Wduplicated-cond -Wnull-dereference
  OPTIONS = USE_LUA=1

Feature list : -EPOLL -KQUEUE -MY_EPOLL -MY_SPLICE -NETFILTER -PCRE
-PCRE_JIT -PCRE2 -PCRE2_JIT +POLL -PRIVATE_CACHE -THREAD
-PTHREAD_PSHARED -REGPARM -STATIC_PCRE -STATIC_PCRE2 -TPROXY
-LINUX_TPROXY -LINUX_SPLICE -LIBCRYPT -CRYPT_H -VSYSCALL -GETADDRINFO
-OPENSSL +LUA -FUTEX -ACCEPT4 -MY_ACCEPT4 -ZLIB -SLZ -CPU_AFFINITY
-TFO -NS -DL -RT -DEVICEATLAS -51DEGREES -WURFL -SYSTEMD
-OBSOLETE_LINKER -PRCTL -THREAD_DUMP -EVPORTS

Default settings :
  bufsize = 16384, maxrewrite = 1024, maxpollevents = 200

Built with Lua version : Lua 5.3.5
Built with transparent proxy support using: IP_TRANSPARENT
IPV6_TRANSPARENT IP_FREEBIND
Built without multi-threading support (USE_THREAD not set).
Built without PCRE or PCRE2 support (using libc's regex instead)
Encrypted password support via crypt(3): yes
Built without compression support (neither USE_ZLIB nor USE_SLZ are set).
Compression algorithms supported : identity("identity")

Available polling systems :
       poll : pref=200,  test result OK
     select : pref=150,  test result OK
Total: 2 (2 usable), will use poll.

Available multiplexer protocols :
(protocols marked as <default> cannot be specified using 'proto' keyword)
              h2 : mode=HTTP       side=FE|BE     mux=H2
            fcgi : mode=HTTP       side=BE        mux=FCGI
       <default> : mode=HTTP       side=FE|BE     mux=H1
       <default> : mode=TCP        side=FE|BE     mux=PASS

Available services : none

Available filters :
[SPOE] spoe
[CACHE] cache
[FCGI] fcgi-app
[TRACE] trace
[COMP] compression

Also enclosed haproxy.cfg, pre.lua and main.go files
Start haproxy
$time ./haproxy -f haproxy.cfg
Run the load test
$go run main.go

Regards,
sada.


On Thu, Jan 2, 2020 at 5:19 PM Aleksandar Lazic <al-hapr...@none.at> wrote:
>
> Hi.
>
> Am 03-01-2020 01:36, schrieb Sadasiva Gujjarlapudi:
>
> > 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://www.arpalert.org/haproxy-lua.html#h209
> >
> > I want to add a param to `Socket:connect()` or add new method
> > `Socket:connect2()`.
> > to disable forced GC.
> > Any feedback is appreciated.
>
> Please can you share some more informations.
>
> haproxy -vv
> lua version
> uname -a
>
> Small reproducible config and lua files.
>
> > Regards,
> > sada
>
> Regards
> Aleks

Attachment: pre.lua
Description: Binary data

Attachment: haproxy.cfg
Description: Binary data

Attachment: main.go
Description: Binary data

Reply via email to