socat usage for FIFO speed vs socket speed on localhost

Posted by Fishy on Stack Overflow See other posts from Stack Overflow or by Fishy
Published on 2010-03-14T04:09:59Z Indexed on 2010/03/14 4:15 UTC
Read the original article Hit count: 688

Filed under:
|
|

Hello,

As per a suggestion on stackoverflow, to compare IPC on a single machine using a) sockets (TCP) on localhost to localhost b) using FIFOs

(between Java and C)

To answer (a), I used netcat to gauge transfer speed (91 MBytes/sec)[1]

(b) Q: How can I test FIFO write speed using socat?

My approach(where /tmp/gus is created using mkfifo on RHEL):

dd if=/dev/zero of=/tmp/gus bs=1G count=1

but i get:

1073741824 bytes (1.1 GB) copied, 1.1326 seconds, 948 MB/s

Does this mean writing to a FIFO ~10 times faster? Or is my experiment completely wrong ?

Thank you Sporsi

[1] From machine A to B across 1Gbps link, this number dropped to ~80 MBytes/sec - I expected localhost to be much higher ...

© Stack Overflow or respective owner

Related posts about socat

Related posts about pipes