Hi, On Thu, Feb 05, Klavs Klavsen wrote: > Jarno Huuskonen wrote on 02/05/2015 01:28 PM: > >Hi, > > > >On Thu, Feb 05, Klavs Klavsen wrote: > >>Hi guys, > >> > >>I'm testing our haproxy setup in regards to SSL performance - by > >>simply using ab, and fetching a favicon.ico file.. > >> > >>over http haproxy delivers 3.000 req/s. > >>over https haproxy delivers 511 req/s. > >> > >>I tried giving haproxy more cores (it's a virtual server) -but this > >>did not help at all :( > > > >Silly question: when you added more vCPUs to the virtual machine > >did you change haproxy nbproc setting (make haproxy use more than > >1process) ? > > > > Not silly at all.. I had naive figured it would scale on cpu's per > default :) > > Adding daemon and nbproc setting = number-of-cores and testing again. > > I tried also setting cpu-map - but apperaently that needs to be > specificly enabled at build time.. Is that an unsafe feature? > > Also - in regards to stats, I can understand that the stats will no > longer be accurate?
You can bind different procs to use different stats sockets. Something like: stats socket /path/to/stats level admin process 1 stats socket /path/to/stats2 level admin process 2 stats socket /path/to/stats3 level admin process 3 stats socket /path/to/stats4 level admin process 4 > We currently fetch stats and insert in out graphite system.. which > will be useless then.. :( You could collect stats from all processes and aggregate results. Or have dedicated processes for https that send traffic to http frontend (something like): listen HTTPS_in bind-process 2 3 4 mode tcp # (or http if you want http acls here) bind address:443 crt ... server http_in 127.0.0.1:666 send-proxy-v2 frontend HTTP_in bind-process 1 bind 127.0.0.1:666 accept-proxy bind *:80 ... mode http ... default_backend ... And then you can collect stats from socket thats bound to process 1. I think you can find better examples from list archives. (Or think this describes similar setup: http://brokenhaze.com/blog/2014/03/25/how-stack-exchange-gets-the-most-out-of-haproxy/) -Jarno > Is it in the works, for haproxy to perhaps used some shared-memory > section, with a semaphore locking ofcourse, to collect stats for all > in one ? -- Jarno Huuskonen