I read a lot of articles about differences between message queue and shared memory. But still not clear which one is good for achieving good performance.
Like shared mem
Message Queue and shared memory are used to share data between 2 processes. Message queue requires data to be shared in specific format. Both processes must agree on this and share the messages. Kernel allows us to read entire message or read nothing for message queues. But shared memory requires part of segment is shared between 2 processes, both can do some synchronization technique and share the data between processes. Since there is no need to copy data to share to other process, shared memory is faster.