On Sunday 15 November 2009 18:32, Leslie Turriff wrote:
> I wonder how intelligent the Linux pipe mechanism is? If the connection
>works by something equivalent to QSAM's get/locate, put/locate, the overhead
>would be miniscule; just passing pointers and reactivating the pipeline
>stages?
It's not quite that smart. Linux has to copy the data from kernel-space
buffers into user-space memory, at least. So even if the block of data is in
the page cache, there's still a copy operation. It doesn't just give a
pointer to the kernel's block to a process, which is I think what you're
describing there.
Thanks for the test script! I think that is a better test than mine, because
it does more switching between files. BTW: I get similar results, both on a
laptop and a Linux instance under z/VM, and with 500 100K files: about the
same time in user-space, and the named pipe took more system time. But for
these small jobs that system time could be just noise.
- MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software
275 Grove Street · Newton, MA 02466-2272 · USA
Tel: +1.617.614.4321
Email: [email protected]
Web: www.rocketsoftware.com
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390