This is a preliminary benchmark for inets-3.0JBc updated 23 Mars 2002
Both client and server run on a Dell Inspiron 8100, 1Ghz running RedHat 7.2. On this machine I got OTP-R8-0 configured and compiled in the default way. Each test was made by letting the client spew out GET requests for a small (372 bytes) static page as fast as it could and then continue until I had received 20000 responses. Only responses with a status code of 200 was seen as ok. Default httpd.conf have been used (same for inets-3.0 and inets 2.6), but MaxClients was increased to 150 for inets (equal as for default in the Apache configuration). In the non-persistent case I let the test client spawn new connections until I had a maximum number of open connections. In the persistent case I additionally used a pipeline size of max 2.
- Error Reason 503 means that I received a response with status 503 (HTTP server temporary overload), - closed, ??? - einval, ??? - enfile (out of Ports), - etimedout (TCP session timeout) are all errors received from gen_tcp:connect/3, gen_tcp:send/2 and gen_tcp:close/1 and when receiving data. Finally, timeout is generated internally in the client. ****** inets-3.0a client and inets-3.0a server +Persistent connection (85.8870 ok response/s) Total responses:20000: time:00:01:55 response/s:173.913 9877 ok 10123 error responses Error Reason: 503: 5470 Error Reason: closed: 2453 Error Reason: einval: 2200 +Non Persistent connection (66.0182 ok response/s) Total responses:20000: time:00:00:55 response/s:363.636 3631 ok 16369 error responses Error Reason: 503: 14285 Error Reason: closed: 741 Error Reason: einval: 1339 Error Reason: {enfile,[{erlang,open_port_prim,[{spawn,tcp_inet},[binary]]}, {prim_inet,open0,1}, {prim_inet,open1,2}, {inet,open,7}, {inet_tcp,do_connect,4}, {gen_tcp,try_connect,6}, {gen_tcp,connect,4}, {http,handle_new_connection,2}]}: 4 ****** inets-3.0a client and inets-2.6 server +Non Persistent connection (62.1299 ok response/s) Total responses:20000: time:00:04:14 response/s:078.740 15781 ok 4219 error responses Error Reason: 503: 55 Error Reason: etimedout: 104 Error Reason: timeout: 2807 Error Reason: {enfile,[{erlang,open_port_prim,[{spawn,tcp_inet},[binary]]}, {prim_inet,open0,1}, {prim_inet,open1,2}, {inet,open,7}, {inet_tcp,do_connect,4}, {gen_tcp,try_connect,6}, {gen_tcp,connect,4}, {http,handle_new_connection,2}]}: 1253 ****** inets-3.0a client and Apache 1.3.22 server +Persistent connection (1250.00) Total responses:20000: time:00:00:16 response/s:1250.000 20000 ok 0 error responses +Non Persistent connection (791.520) Total responses:20000: time:00:00:25 response/s:800.000 19788 ok 212 error responses Error Reason: closed: 212