POE::Driver::SysRW's constructor lets you set the read block size. You can make it as large as sysread() supports. Do realize that reading 200KB at a time means that your program will consume some multiple of that while the data is moving around in memory. Remember to multiply that by the number of concurrent connections you expect.

POE::Component::Server::TCP does not expose POE::Driver::SysRW's constructor parameters. It is designed for the 80-90% of applications that don't need special tuning. People writing special-case software are encouraged to use the lower-level modules that offer a lot more tuning: POE::Wheel::SocketFactory (for the TCP server); POE::Wheel::ReadWrite (for the client/server interaction); POE::Filter::Line (which supports many different line separators, or some other filter); and POE::Driver::SysRW (to tune block sizes).

You might also want to look at POE::Wheel::ReadWrite's flow control facilities. They'll help tune the memory/buffer size tradeoff on the write side of things.

Finally, it's important to remember that these classes are written in Perl. If one doesn't do what you want, subclass it. Or send the author a patch. Or write your own replacements. If they share the core POE::Kernel library, your own classes will work happily beside the ones already written.

-- Rocco Caputo - http://poe.perl.org/


In reply to Re^5: POE Question by rcaputo
in thread POE Question by Anonymous Monk

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.