[linux-audio-dev] FIFOs vs. sockets

Paul Davis paul at linuxaudiosystems.com
Thu May 15 22:31:01 UTC 2003


>On linux, which is faster, pipe, FIFO, or socket? What about shared
>memory - is it faster, and if so is it faster enough to warrant the
>extra programming overhead?

depends what you want to do.

for communication that can wake another thread/process, shared memory
is not an option: there is no way to "wait" on shared memory. for
that, a pipe is notably faster than a tcp socket and a bit faster than
a unix socket. for actual data movement, shared memory beats
everything hands down since its zero copy.

linux pipes are about the fast IPC on any operating system so far,
although i have heard good things about futexes in kernel 2.5/2.6.

--p



More information about the Linux-audio-dev mailing list