Hi,

On Sat, Jan 23, 2010 at 12:05:16PM +0800, ËïéªËÉ wrote:
> Hello !  I have questions ! please help me ! thank you very much !
> my cluster works , but not excellent. that's
> please see this architecture  below my questions first.
> Q1:on the tomcats ,there are always 500~800 TIME_WAIT connections from 
> haproxy;

Time_wait sockets are harmless and normal. 800 is very low and you
don't have to worry about them. I have already reached 4 millions :-)

> Q2:when I use loadrunner to test this cluster , the result disappointed my 
> very much.

you have to describe a bit more what happened.

(...)
> global
>             log 127.0.0.1   local0 notice
>             maxconn 40960
>             chroot /usr/local/haproxy/chroot
>             uid 99
>             gid 99
>             nbproc  8

remove nbproc, it can only cause you trouble.

>             pidfile /usr/local/haproxy/logs/haproxy.pid
>             stats socket /var/run/haproxy.stat mode 600
>             stats maxconn 65536

you don't need to support 64k connections to the stats socket,
that's nonsense. Simply remove this statement.

>             ulimit-n 65536

you can safely remove that one too since it's automatically
computed from maxconn.

>             daemon
>             #debug
>             #quiet
>             nosepoll

You can save some CPU cycles by commenting out nosepoll.

> defaults
>             log global
>             mode          http
>             option         httplog

please add "log global" here, otherwise you won't log.

>             retries         3
>             option         redispatch
>             option         abortonclose
>             maxconn      40960

Please always ensure that any defaults or listen or frontend's
maxconn is lower than the global one.

>             contimeout   5000
>             clitimeout     30000
>             srvtimeout     30000
>             timeout     check 2000
>             option  dontlognull
> frontend  haproxy
>             bind       0.0.0.0:80
>             mode      http
>             option     httplog
>             option     httpclose
>             option     forwardfor
>        maxconn    50000

same here about maxconn.

>             clitimeout   30000
>             acl     statcs     url_reg 
> ^[^?]*\.(jpg|html|htm|png|gif|css|shtml)([?]|$)

This one can be simplified a lot and without an expensive regex :

              acl     statcs     path_end .jpg .html .htm .png .gif .css .shtml

OK, your config is otherwise correct.

What load did you reach with loadrunner, in terms of requests per
second and concurrent connections ? What response time did you
observe ?  What haproxy version are you running on ?

You may have to start a new test with the fixed parameters above
and with logging enabled (please check that your syslog daemon
correctly logs). Otherwise you won't know where your issues happen.

Regards,
Willy


Reply via email to