RE: RES: RES: Help with kQueue
Hi Fred, Seems with kqueue the CPU usage, reduces in 50%, which is great. Yep, the polling system is very important to performance, and select() is basically the worst of them. Do you know if they plan to add FTP Protocol support ? I can't speak for Willy, but I did not see anything regarding FTP on the mailing list. I don't think this will land on the roadmap in short term. I Know how to configure it work with passive mode, which isn't hard, but would be cool having native support for active mode ! Couldn't you just source NAT the active data connection on the HAProxy box? Regards, Lukas
RE: Help with kQueue
Hi Fred, #proxy/haproxy -V -d -f /proxy/lr.cfg -n 8192 Available polling systems : select : pref=150, test result OK kqueue : disabled, test result OK poll : disabled, test result OK Total: 3 (1 usable), will use select. Using select() as the polling mechanism. Does it work if you omit -d? Can you post the full output of haproxy -vv? What HAproxy version are you using and how did you compile it (what USE_FLAGs)? Lukas
RES: Help with kQueue
HA-Proxy version 1.4.20 2012/03/10 Copyright 2000-2012 Willy Tarreau w...@1wt.eu Build options : TARGET = freebsd CPU = generic CC = gcc Default settings : maxconn = 1024, bufsize = 8030, maxrewrite = 1030, maxpollevents = 200 Encrypted password support via crypt(3): no Available polling systems : kqueue : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use kqueue. Without -d, it doesn't uses kQueue either. I used -d just to find out what was happening. -Mensagem original- De: Lukas Tribus [mailto:luky...@hotmail.com] Enviada em: quinta-feira, 30 de maio de 2013 05:22 Para: Fred Pedrisa; haproxy@formilux.org Assunto: RE: Help with kQueue Hi Fred, #proxy/haproxy -V -d -f /proxy/lr.cfg -n 8192 Available polling systems : select : pref=150, test result OK kqueue : disabled, test result OK poll : disabled, test result OK Total: 3 (1 usable), will use select. Using select() as the polling mechanism. Does it work if you omit -d? Can you post the full output of haproxy -vv? What HAproxy version are you using and how did you compile it (what USE_FLAGs)? Lukas
RE: Help with kQueue
# /proxy/haproxy -vv -c -f l2cr.cfg Available polling systems : kqueue : pref=300, test result OK #proxy/haproxy -V -d -f /proxy/lr.cfg -n 8192 Available polling systems : select : pref=150, test result OK You are comparing two different configurations, are you sure non of them disables poll and kqueue? Can you run: egrep -i queue|poll l2cr.cfg egrep -i queue|poll /proxy/lr.cfg diff -u l2cr.cfg /proxy/lr.cfg 1.4.20 Can you grab the latest tarball at http://haproxy.1wt.eu/, this release is outdated. Lukas
RES: Help with kQueue
Hello, Lr.cfg and l2cr.cfg are both the same files :) -Mensagem original- De: Lukas Tribus [mailto:luky...@hotmail.com] Enviada em: quinta-feira, 30 de maio de 2013 12:46 Para: Fred Pedrisa; haproxy@formilux.org Assunto: RE: Help with kQueue # /proxy/haproxy -vv -c -f l2cr.cfg Available polling systems : kqueue : pref=300, test result OK #proxy/haproxy -V -d -f /proxy/lr.cfg -n 8192 Available polling systems : select : pref=150, test result OK You are comparing two different configurations, are you sure non of them disables poll and kqueue? Can you run: egrep -i queue|poll l2cr.cfg egrep -i queue|poll /proxy/lr.cfg diff -u l2cr.cfg /proxy/lr.cfg 1.4.20 Can you grab the latest tarball at http://haproxy.1wt.eu/, this release is outdated. Lukas
RES: Help with kQueue
# ./haproxy -d -f /proxy/l2cr.cfg -n 8192 Available polling systems : kqueue : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result FAILED Total: 3 (2 usable), will use kqueue. Using kqueue() as the polling mechanism. Here is what happens with the latest version, looks like it will use kqueue !! but select fail ? :D -Mensagem original- De: Lukas Tribus [mailto:luky...@hotmail.com] Enviada em: quinta-feira, 30 de maio de 2013 12:46 Para: Fred Pedrisa; haproxy@formilux.org Assunto: RE: Help with kQueue # /proxy/haproxy -vv -c -f l2cr.cfg Available polling systems : kqueue : pref=300, test result OK #proxy/haproxy -V -d -f /proxy/lr.cfg -n 8192 Available polling systems : select : pref=150, test result OK You are comparing two different configurations, are you sure non of them disables poll and kqueue? Can you run: egrep -i queue|poll l2cr.cfg egrep -i queue|poll /proxy/lr.cfg diff -u l2cr.cfg /proxy/lr.cfg 1.4.20 Can you grab the latest tarball at http://haproxy.1wt.eu/, this release is outdated. Lukas
RE: RES: Help with kQueue
Hi Fred, Here is what happens with the latest version, looks like it will use kqueue !! but select fail ? :D I guess you have a maxsock FD_SETSIZE condition, which in recent releases disables select(). See [1] and [2]. I'm not sure what bug/change you run into, but I guess its enough to know that the latest release works with both kqueue and poll. Regards, Lukas [1] http://www.mail-archive.com/haproxy@formilux.org/msg09362.html [2] http://haproxy.1wt.eu/git?p=haproxy-1.4.git;a=commit;h=f4096052b9397e29c3638651e7487c047081c00c
RES: RES: Help with kQueue
Hello, Yes, surely ! Seems with kqueue the CPU usage, reduces in 50%, which is great. I am using haproxy as a regular TCP Proxy for tcp applications (not for websites). Do you know if they plan to add FTP Protocol support ? I Know how to configure it work with passive mode, which isn't hard, but would be cool having native support for active mode ! Sincerely, Fred -Mensagem original- De: Lukas Tribus [mailto:luky...@hotmail.com] Enviada em: quinta-feira, 30 de maio de 2013 20:09 Para: Fred Pedrisa; haproxy@formilux.org Assunto: RE: RES: Help with kQueue Hi Fred, Here is what happens with the latest version, looks like it will use kqueue !! but select fail ? :D I guess you have a maxsock FD_SETSIZE condition, which in recent releases disables select(). See [1] and [2]. I'm not sure what bug/change you run into, but I guess its enough to know that the latest release works with both kqueue and poll. Regards, Lukas [1] http://www.mail-archive.com/haproxy@formilux.org/msg09362.html [2] http://haproxy.1wt.eu/git?p=haproxy-1.4.git;a=commit;h=f4096052b9397e29c3638 651e7487c047081c00c
Help with kQueue
De: Fred Pedrisa [mailto:fredhp...@hotmail.com] Enviada em: quinta-feira, 30 de maio de 2013 02:09 Para: 'haproxy@formilux.org' Assunto: Help with kQueue Hello, Guys. Sorry for disturbing, and for the first e-mail I sent, I thought it was an automated mailing list, requiring to subscribe J. Anyways here is my interesting issue ! When I start haproxy with -vv -d -c switchs, I get this interesting result : # /proxy/haproxy -vv -c -f l2cr.cfg Available polling systems : kqueue : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use kqueue. But if I try it, with -V -d #proxy/haproxy -V -d -f /proxy/lr.cfg -n 8192 Available polling systems : select : pref=150, test result OK kqueue : disabled, test result OK poll : disabled, test result OK Total: 3 (1 usable), will use select. Using select() as the polling mechanism. This is what happens, it default to select without any reason, and in the config file, I don't have any of these global switchs to force this situation :/ Do you wonder what could cause it ? I am using FreeBSD ! Thanks, Fred