5 ms·
A named pipe (fifo) would be an interest to test too. I believe theyre a good bit faster than a unix socket.
by parhamn 2y ago
A named pipe (fifo) would be an interest to test too. I believe theyre a good bit faster than a unix socket.
- i80and 2y agoMy recollection from Advanced Programming in the Unix Environment is that unix sockets are actually often faster than named pipes: You got me curious; according to a quick search, that seems to hold up according to this more recent post (which doesn't note the OS, annoyingly): https://www.yanxurui.cc/posts/server/2023-11-28-benchmark-tcp-uds-namedpipe/#results https://www.yanxurui.cc/posts/server/2023-11-28-benchmark-tc... I'd be interested in more robust data here.
- novafacing 2y agoIIRC for most packets, UDS are actually faster (not by a massive amount) than named pipes: https://stackoverflow.com/questions/1235958/ipc-performance-named-pipe-vs-socket https://stackoverflow.com/questions/1235958/ipc-performance-... and this advantage increases with packet size (from my own testing).
- parhamn 2y agoTIL! Thanks for the link.
- renewiltord 2y agoHave only seen the other way but shmem with a spinloop should be faster.