[sf-perl] Programmer's guide to Perl I/O

James Briggs james at actionmessage.com
Tue Oct 13 16:02:20 PDT 2020


1) Your question is oddly specific. I haven't seen any detailed
perl io document coming up in the past 2 decades, likely because
anybody who cared about disk IO performance would just use C (like me.)

You may have to write your own benchmarks and write your own guide ...

2) What we did at Yahoo back in the day to characterize database
performance was to compare wire speed to database feature speed, and
then profile and understand the db bottlenecks.

You may want to write a perl io test suite and run it on say a
spinning hard drive (slow enough to contrast) and see what the numbers
tell you. Though of course, it's really the underlying C/glibc doing
any heavy-duty work.


a) I'm doing a bunch of REST API client and server programming in perl
this week with OpenAPI, so let me know of any questions about that area.


b) Also, I'm associated with RackPing Monitoring/Observability.
You can sign up for a free monitoring account with RackPing:

Thanks, James.

On Sat, 10 Oct 2020 23:34:00 -0700, David Christensen wrote
> On 2020-10-10 22:47, Joseph Brenner wrote:
> > David Christensen wrote:
> >> I am looking for a programmer's guide to input/ output on current 
> >> versions of Perl:
> >> I feel that I need to understand the "big picture", the details -- 
> >> "layers", binary/ character mode, encoding (UTF-8), etc., -- and
> >> the various generalized forms -- console, files, and network
> >> connections, etc..  I am looking for a style of presentation that
> >> covers the principles and concepts of I/O in general, and then
> >> covers the design and implementation of the Perl I/O subsystem(s)
> >> specifically.  While I would expect such to contain examples, I am
> >> not looking for a tutorial. A practical goal is to learn how to use
> >> PerlIO::*, IO::*, and/or other modules effectively.
> > Have you looked at the perlapio page?
> > 
> > https://perldoc.perl.org/perlapio
> > 
> > If you want some help understanding unicode and i/o layers I might
> > be able to help with that, but I suspect you want to drill down
> > deeper than I've gone into what's going on-- e.g. it occurs to me
> > that I don't even know how big your buffer is if you use standard
> > buffered output.
> Thanks for the link.  :-)
> I have been reading a related document that cross-links with the above:
>      https://perldoc.perl.org/perliol
> Both cover an important piece of the puzzle, and are probably the 
> canonical documents for understanding the I/O layer system.  So, 
> they are useful for those details.
> Both appear to be C/XS.  I am hoping to work in pure Perl.
> There are some key points related to 'open' and 'binmode', and 
> advice for UTF-8.
> Using the "blind men and an elephant" parable, there seems to be a 
> fair number of documents that describe various details of Perl I/O; 
> I desire a document that describes the whole elephant.
> David

More information about the SanFrancisco-pm mailing list