gen_tcp:connect taking 3 seconds under load

Jacob Vorreuter jacob.vorreuter@REDACTED
Fri Apr 16 02:56:06 CEST 2010


Hi,

I'm load testing an Erlang proxy server that accepts incoming client connections and proxies data to backend server sockets.  Normally, the call to gen_tcp:connect to open the backend socket takes under 3 milliseconds.  However, under heavy load this call sometimes takes 3 seconds.  The strange thing is that it rarely takes any amount of time in the middle of that range.  It's either 3 milliseconds or 3000.  This is the call I'm making:

gen_tcp:connect(Ip, Port, [binary, {packet, 0}]).

Has anyone seen this behavior before?  I'm load testing with ab, making anywhere from 64 to 1000 concurrent requests.

Thanks,

Jake


More information about the erlang-questions mailing list