Re: [linux-audio-dev] FIFOs vs. sockets

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] FIFOs vs. sockets
From: Paul Davis (paul_AT_linuxaudiosystems.com)
Date: Fri May 16 2003 - 05:23:56 EEST


>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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri May 16 2003 - 05:28:02 EEST