Hi Monks,
I'm happily using
HTTP::Daemon but a recent benchmark kind of disappointed me. I'm using the module for my message-passing needs via HTTP GET and just return success/failure on HTTP status code. I wrote a small
WWW::Curl::easy -based script to test how fast the operations can get. I manage to get persistent connections to work for added speed. I observed that HTTP::Daemon seems to handle a fixed 24 requests/sec on both machines I tested (P4 2.4GHz vs. P3 800MHz). I traced the slow response to a sysread() call in HTTP::Daemon.pm, taking up a fixed time of around 0.04ms. Is sysread() that slow?
For comparison, I tested the client on Apache/Mod_Perl and it handles around 100 req/sec on the P3-800 and around 500 req/sec on a P4 2.4GHz. Scaling is not a problem as I managed to get a preforking server to work with each server child handling 25 req/sec for each persistent-connected client. I'm curious why sysread() is that slow for both machines.
Thanks!