On Sat, Dec 9, 2017 at 10:18 PM, Willy Tarreau <w...@1wt.eu> wrote:
> On Sat, Dec 09, 2017 at 10:10:25AM +0100, Pavlos Parissis wrote:
>> On 09/12/2017 05:01 ?u, Christopher Lane wrote:
>> > It is plausible/expected that my version upgrade performance goes like 
>> > (about 4K connections,
>> > long lived and short lived mix, TCP only, no HTTP:
>> >
>> > 1.5.12 (nproc 1, old connections causing about 100 old -sf processes to 
>> > linger) uses 100% CPU
>> > almost all the time, frequently with >1 process.  (100%, 75%, 48%, ... ).  
>> > Highest CPU user has
>> > 2-3K connections.
>> >
>> > 1.8.1 (nbproc 4, with hard-stop-after 600s) using like 1%, 3%, 3%, 8% CPU  
>> > Also 2-3K
>> > connections.
>> >
>>
>> You compare multi-process setup with a single process setup, which isn't a
>> fair comparison.
>> Do you see the same the performance increase with 1.8.1, when you configure
>> it with one process?
>
> Good observation! Also I'd add that concurrent connections alone have no
> impact on CPU usage but on memory. The only exception is if you're using
> a low performance poller like poll() instead of epoll or kqueue. This is
> visible in haproxy -vv and might happen if the previous version was built
> for a generic OS.
>
> Cheers,
> Willy

Ahh, yes, poll vs. epoll may explain it:

The 1.5.1 -vv is:

 /usr/local/sbin/haproxy -vv
HA-Proxy version 1.5.12 2015/05/02
Copyright 2000-2015 Willy Tarreau <w...@1wt.eu>

Build options :
  TARGET  = generic
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing
  OPTIONS = USE_OPENSSL=1

Default settings :
  maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200

Encrypted password support via crypt(3): no
Built without zlib support (USE_ZLIB not set)
Compression algorithms supported : identity
Built with OpenSSL version : OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
Running on OpenSSL version : OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : no (version might be too old, 0.9.8f min needed)
OpenSSL library supports prefer-server-ciphers : yes
Built without PCRE support (using libc's regex instead)

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


And 1.8.1:

/usr/local/sbin/haproxy.1.8.1 -vv
HA-Proxy version 1.8.1 2017/12/03
Copyright 2000-2017 Willy Tarreau <wi...@haproxy.org>

Build options :
  TARGET  = linux26
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement
-fwrapv -Wno-unused-label
  OPTIONS = USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_CPU_AFFINITY=1
USE_OPENSSL=1 USE_STATIC_PCRE=1

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

Built with OpenSSL version : OpenSSL 1.0.2k  26 Jan 2017
Running on OpenSSL version : OpenSSL 1.0.2k  26 Jan 2017
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports : SSLv3 TLSv1.0 TLSv1.1 TLSv1.2
Built with transparent proxy support using: IP_TRANSPARENT
IPV6_TRANSPARENT IP_FREEBIND
Encrypted password support via crypt(3): yes
Built with PCRE version : 6.6 06-Feb-2006
Running on PCRE version : 6.6 06-Feb-2006
PCRE library supports JIT : no (USE_PCRE_JIT not set)
Built with zlib version : 1.2.3
Running on zlib version : 1.2.3
Compression algorithms supported : identity("identity"),
deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
Built with network namespace support.

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

Available filters :
        [SPOE] spoe
        [COMP] compression
        [TRACE] trace

Nice to know the real root cause, although we are going to try 1.5
with the correct health check just to see.

Reply via email to