[linux-audio-dev] Re: fifos & unix domain sockets

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

Subject: [linux-audio-dev] Re: fifos & unix domain sockets
From: Benno Senoner (sbenno_AT_gardena.net)
Date: la loka   09 1999 - 22:21:05 EDT


On Sun, 10 Oct 1999, est_AT_hyperreal.org wrote:
> Benno Senoner discourseth:
> >
> > Seems like the fifo uses one single fifo buffer and doesn't care who is the
> > reader.
>
> Correct. :)
>
> > that means no reliable fullduplex communication.
>
> Emphatically correct. :)
>
> > I don't know almost nothing about the efficiency of unix domain sockets,
> > and if they are implemented by using 2 ring buffers to implement
>
> I tested their throughput a couple of months ago on Linux. They were
> about 1.55 times slower than pipes/fifos. A tcp connection on the
> same machine was 1.6 times slower still (i.e., 2.5 times slower than
> pipes/fifos).
>
> Eric

ah, good to know !
but how did you compare the fifos to unix sockets ?

make sure that you compare 2 FIFOs (for fullduplex)
to 1 socket.
Because fullduplex communication requires more context switches.

I think a fair comparison is run the following code
for FIFO performance testing:

process A:
while(1)
{
  write data to pipe1
  read data from pipe2
}

process B:
while(1)
{
  read data from pipe1
  write data to pipe2
}

and for the unix socket case you should run:

process A:
while(1)
{
  write data to socket
  read data from socket
}

process B:
while(1)
{
  read data from socket
  write data to socket
}

Am I missing something ?
naaahh
:-)

regards,
Benno.


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

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:13 EST