4 ms·
Interesting that on Linux Unix Domain Sockets are not faster than TCP. People often say that the TCP stack overhead is high but this benchmark does not confirm
by nh2 2y ago
Interesting that on Linux Unix Domain Sockets are not faster than TCP.
People often say that the TCP stack overhead is high but this benchmark does not confirm that.
- jcelerier 2y agoI'm curious about the benchmark. In my own for another network IPC library (https://GitHub.com/ossia/libossia https://GitHub.com/ossia/libossia) Unix sockets were consistently faster than the alternatives when sending the same payloads.
- billywhizz 2y agothe linux results are for a vm running on macos. not sure how useful that is. i certainly wouldn't draw any wider conclusions from them without trying to reproduce yourself. pretty sure they will be very different on bare metal.
- billywhizz 2y agoi couldn't resist reproducing on bare metal linux (8th gen core i5, ubuntu 22.04): cargo run --release -- -n 1000000 --method unixstream cargo run --release -- -n 1000000 --method tcp ~9μs/op for unixstream, ~14μs/op for TCP. unixstream utilizes two cores at ~78% each core, tcp only utilizes ~58% of each core. so there is also something wrong in the benchmarks where blocking is happening and cores are not being fully utilized.
- pranitha_m 2y agoOur prod env is comprised of cloud VMs so tried to replicate that. Have some benchmarks from prod env, will share those.