Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Pipe vs Unix Socket Performance

From wiki.openlighting.org

Revision as of 19:17, 13 August 2011 by Nomis52 (talk | contribs) (Created page with "Here are some numbers on pipe() vs socketpair() performance. The sample program used either pipe() or socketpair() to create a set of file descriptors. The main thread sent 512MB…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here are some numbers on pipe() vs socketpair() performance. The sample program used either pipe() or socketpair() to create a set of file descriptors. The main thread sent 512MB of data through the fds and then closed the sending side. A receiving thread read all the data until EOF and then exited.


Mac OS X 10.6.8

Pipes
real    0m8.501s
user    0m5.751s
sys     0m4.185s

real    0m8.462s
user    0m5.721s
sys     0m4.078s

Unix Sockets
real    0m9.782s
user    0m6.329s
sys     0m7.301s

real    0m9.992s
user    0m6.360s
sys     0m7.417s

Linux

Linux 2.6.18 VM

This benchmark only sent 51 MB of data because it was running in a VM.

Pipes
real	0m9.359s
user	0m2.377s
sys	0m1.603s

real	0m11.233s
user	0m2.253s
sys	0m2.345s

Unix Sockets
real	0m10.903s
user	0m2.178s
sys	0m2.380s

real	0m11.053s
user	0m2.280s
sys	0m2.422s