On 8 July 16:55 2009 Niels Provos spoke: | | You might want to try the benchmark tool with libevent-2.0.1-alpha or | directly from trunk. There has been a lot of work to reduce data | copies.
Hi Niels, 'lb' is linked against libevent 'trunk' code under my own contrib/lb/ directory. contrary to 'ab' and 'cb' I decided to use dynamic allocated/freed memory. so for example the push_cb() function in callbacks.c pushes data on the wire by simply doing something like: ... req_t * request = calloc (sizeof (req_t), 1); /* Define a new connection with the HTTP server */ request -> evcon = evhttp_connection_base_new (base, server -> uri -> hostname, atoi (server -> uri -> port)); /* Sets the timeout for events related to this connection */ evhttp_connection_set_timeout (request -> evcon, server -> reply_tv . tv_sec); /* Sets the retry limit for this connection - -1 repeats indefinitely */ evhttp_connection_set_retries (request -> evcon, server -> maxretry); /* Creates a new request object that needs to be filled in with the request parameters */ request -> evreq = evhttp_request_new (reply_cb, request); /* Add HTTP 'Host' header to the request parameters */ evhttp_add_header (request -> evreq -> output_headers, "Host", server -> uri -> hostname); /* Make an HTTP request over the specified connection */ if (evhttp_make_request (req -> evcon, req -> evreq, EVHTTP_REQ_GET, s -> uri -> path) != -1) ... while the reply_cb() in callbacks.c simply counts and frees allocated memory. So is application memory management the issue? | | Niels. /rocco -- Rocco Carbone mail-to: <rocco /at/ ntop /dot/ org> Pisa Italy Life is in the details In other words, you are welcome to use, share and improve me. You are forbidden to forbid anyone else to use, share and improve what I gave you. _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users