On 03/07/2013 05:46 PM, Lukas Tribus wrote:
When I try with tw_recycle = 0 then I start to get a lot of TIME_WAIT
connections and performance degrades quite quickly so I cannot remove it
for now
This indicates you are running out of source ports and it is
probably why the latency increases with the number of simultaneous connections.
By "source ports" you mean exactly what?
It may be that but as you've seen in my sysctl.conf I already added this
net.ipv4.ip_local_port_range = 1025 65000


Can you please:
- check dmesg for kernel errors/warnings while benchmarking
there isn't a new message since 2 hours when I did the latest changes so no much help there.
- run vmstat 1 while benchmarking and post the result
here it is, it was taken while mid testing with ab so half is with ab half after ab finished /procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----// // r b swpd free buff cache si so bi bo in cs us sy id wa// // 1 0 0 235612 105460 157964 0 0 0 0 11545 6428 5 21 74 0// // 0 0 0 235200 105460 157964 0 0 0 0 12896 7497 8 18 74 0// // 1 0 0 234824 105460 157964 0 0 0 0 14740 8578 4 28 68 0// // 1 0 0 235292 105460 157964 0 0 0 0 10976 6423 1 18 81 0// // 1 0 0 235420 105460 157964 0 0 0 0 9668 5898 3 20 77 0// // 1 0 0 234296 105460 157964 0 0 0 0 12969 8001 2 25 73 0// // 1 0 0 234672 105460 157964 0 0 0 0 13888 8529 3 23 74 0// // 0 0 0 235076 105460 157964 0 0 0 0 8081 4717 3 18 79 0// // 1 0 0 235516 105460 157964 0 0 0 0 8465 5026 0 13 87 0// // 0 0 0 235004 105460 157964 0 0 0 0 8770 5223 2 18 80 0// // 0 0 0 235100 105460 157964 0 0 0 0 8635 4921 1 18 81 0// // 0 0 0 234904 105460 157964 0 0 0 0 9532 5805 3 21 76 0// // 0 0 0 234696 105460 157964 0 0 0 0 11013 6468 3 20 77 0// // 0 0 0 235728 105460 157964 0 0 0 0 9707 5185 3 14 83 0/

- specify the exact version and build config (haproxy -vv)
/# haproxy -vv//
//HA-Proxy version 1.5-dev17 2012/12/28//
//Copyright 2000-2012 Willy Tarreau <[email protected]>//
//
//Build options ://
//  TARGET  = linux26//
//  CPU     = native//
//  CC      = gcc//
//  CFLAGS  = -m64 -march=x86-64 -O2 -march=native -g -fno-strict-aliasing//
//  OPTIONS = USE_OPENSSL=1 USE_STATIC_PCRE=1//
//
//Default settings ://
// maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200//
//
//Encrypted password support via crypt(3): yes//
//Built without zlib support (USE_ZLIB not set)//
//Compression algorithms supported : identity//
//Built with OpenSSL version : OpenSSL 0.9.8o 01 Jun 2010//
//OpenSSL library supports TLS extensions : yes//
//OpenSSL library supports SNI : yes//
//OpenSSL library supports prefer-server-ciphers : yes//
//
//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.//
//
//
/
- specify exact linux kernel release (uname -a)
# uname -a
Linux HAproxy 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux



I'm not sure if it helps in your environment, but could you try the
"option nolinger" in the backend?
I added it, not much of a difference from what I can see.

Thank you so much for your assistance on this matter,
Alex

Reply via email to