I've mentioned before on this list that when I tested LiS pipes/FIFOs against kernel pipes/FIFOs (shortly after I wrote them, around LiS 2.9 or so), the ratio was on the order of 10:1. I mentioned it most recently during the discussion of the recent performance-enhancement patches.
It's really not at all surprising. There's no way STREAMS-based pipes and FIFOs could ever be as efficient as the Linux kernel pipes/FIFOs. The kernel implementations are very tight, and can be, because they don't do a heck of a lot. Brian was right about this; don't even think about passing a file descriptor on a kernel pipe, for example, or pushing a module, or anything else that being based on STREAMS allows.
I think Brian is right about HP-UX as well. When I was working with HP-UX, it didn't even have STREAMS-based pipes/FIFOs, just non-STREAMS implementations more similar to what the Linux kernel provides. I've been told AIX still doesn't have STREAMS-based pipes/FIFOs, but I can't verify that myself. (Older SCO versions also didn't have them, but I haven't kept up with its history; I think AIX is at least partly based on old SCO code, hence not only this omission, but the SCO lawsuit against IBM as well. Someone can check me on this, but I don't think STREAMS-based pipes/FIFOs were in SVR3 at all, but showed up in SVR4.)
I would note for sake of completeness that if you need the speed of kernel pipes/FIFOs and only occasionally need the flexibility of STREAMS-based pipes/FIFOs, you can fattach a LiS STREAM over a kernel pipe/FIFO, e.g., a LiS FIFO over a kernel FIFO or a LiS pipe over a kernel pipe (and other combinations as well). So, you don't have to use LiS pipes/FIFOs if they're not fast enough for you, unless you need to do something you can't otherwise do with kernel pipes/FIFOs.
But those things you otherwise can't do don't come free where performance is concerned.
-John
Dave Grothe wrote:
It has always been known (I think) that there is a huge difference in speed between Linux native pipes and streams based pipes via LiS.
I have seen similar results sending UDP datagrams through the Linux loopback driver using native sockets vs the inet driver that Brian publishes. I get about a 10:1 ratio between sockets and streams.
Nothing has ever jumped out at me when I run oprofile during these tests -- except lock contention. Which is what I am working on now.
-- Dave
At 11:58 AM 4/9/2004, Eugene LiS User wrote:
To exclude my module from the picture I have decided to compare data pumping rates for the pipe interface. I have googled pipespeed2 program, downloaded it and with a minor changes got it compiled in 2 versions with and without LiS.
The results are as following:
# ./ps2 2000k 4k ps2 -x 1 2048000 4096 9.163 Seconds -- 915.493 MB/sec
# ./ps2lis 2000k 4k ps2lis -x 1 2048000 4096 45.602 Seconds -- 183.953 MB/sec
Clearly there is some overhead in the LiS version of a pipe. [Hopefuly [for my module] that overhead is not only pipe related]
Attached is a programm.
Compiling with LiS:
# cc -I/usr/src/LiS/include -L /usr/src/LiS/libc -lLiS -o ps2lis pipespeed2.c
Compiling without LiS:
# cc -o ps2 pipespeed2.c
__________________________________________________________________ Introducing the New Netscape Internet Service. Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com <http://www.grisoft.com/>).
Version: 6.0.655 / Virus Database: 420 - Release Date: 4/8/2004
------------------------------------------------------------------------
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 4/8/2004
_______________________________________________ Linux-streams mailing list [EMAIL PROTECTED] http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
