How to measure the speed of data exchange via AF_UNIX sockets? Is it possible to write some two bash scripts:
/dev/null./dev so it will be possible to measure the speed with dd command?You can use netcat -U to easily communicate over unix domain sockets. The pv command comes in handy when you want to know the speed at which data is moving through a pipe.
receiver:
nc -lU /tmp/socket > /dev/null
sender:
pv /dev/zero | nc -U /tmp/socket
In general, unix sockets are really fast. This clocked in at 170 MB/s on my old laptop, and 400 MB/s on my somewhat newer desktop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With