[nanomsg] Re: Interprocess communication on same host

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Fri, 05 Sep 2014 16:21:13 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/09/14 15:56, Ron Gonzalez (Redacted sender zlgonzalez@xxxxxxxxx
for DMARC) wrote:
> Thanks Achille. Just curious why we don't use shared memory for IPC
> so we get the fastest implementation. I guess domain sockets is a
> lot easier to deal with and doesn't require locks?

Even with shmem you need some way to signal the other process that
there's a message to be received. Whether done via IPC socket or some
other means it always takes ~6us.

Thus, the shmem only helps when the cost of copying the data is
non-trivial, i.e. for large messages, say 1MB or such.

Martin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJUCcbZAAoJENTpVjxCNN9YYrQIAJe60kSjolxYgk41Zl2pid/Q
+YnqGyY/CBniGF0cN7MaPiU5xv80urPofeDLIw14ogyCDhIB3cg30NP/7+73gnSy
06ShyQO+Tf1URx2oPEgWg9AD9rEMGnQdyt3jFS9w5uffsJDirtVm9afTvf5O8D8Y
WiF7EVcdVCFfg3QKapyw63M2i5Fjq+A197zpIppiOtqSLYAWVkyLFVfI/r8jHbj+
DtWGYlHIQGFIoeMMRr1R21DndpBE4Hnsc3dRlw9tZsaVtDyNTFdjmBPZkx6IVsi1
JllcT2z+nfTyxsQ5pesn8lMBv1CfBkFZ1/1U4YlUZTxOB7HqWI1kBX9qVC1/tjE=
=ntil
-----END PGP SIGNATURE-----

Other related posts: