Message Queues vs FIFOs

Message Queues vs FIFOs

Post by shailesh.bho » Sat, 25 Apr 1992 00:04:56

Unix Gurus:

We have software running on a tandem fault tolerant computer under
AT&T System V compatible UNIX (hardened/modified by Tandem) that makes
extensive use of the Message Queue IPC for communication between

We are experiencing performance problems and one of the options being
seriously considered is using FIFOs (named pipes) instead of Message

I have done some reading on the subject matter and according to both
Bach (The Design of the UNIX Operating System) and Rochkind (Advanced
UNIX Programming), Message Queues are slightly faster than FIFOs and
have a lot nice features.

However, one of the persons here has done some performance testing and
claims that though the CPU time in both (Message Queue vs FIFO) cases
is almost the same, he got almost twice the thoughput (number of bytes
per second) with FIFOs. Another advantage that is being claimed for
FIFOs is that the receiving process can read the whole FIFO and then
do internal parsing to retrieve individual messages (since messages
are of different lengths). My arguement is that you are essentially
then doing the same thing that the kernel is providing you with Message
Queue mechanism. There may be some savings because of avoiding repeatedly
switching between user and kernel mode. However, is this saving significant?

Can someone shed some light on this matter?

Thanks for the help.

                                                shailesh bhobe
                                                (708) 224-6997