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!

In reply to slow sysread on sockets? by dexterbt1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.