Skip to content
Advertisement

Fastest technique to pass messages between processes on Linux?

What is the fastest technology to send messages between C++ application processes, on Linux? I am vaguely aware that the following techniques are on the table:

  • TCP
  • UDP
  • Sockets
  • Pipes
  • Named pipes
  • Memory-mapped files

are there any more ways and what is the fastest?

Advertisement

Answer

I would suggest looking at this also: How to use shared memory with Linux in C.

Basically, I’d drop network protocols such as TCP and UDP when doing IPC on a single machine. These have packeting overhead and are bound to even more resources (e.g. ports, loopback interface).

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement