[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Re: TCP default?
Julian Rohrhuber-3 wrote
> good point. Careful benchmarking really might be necessary to decide this,
> see e.g.
> http://stackoverflow.com/questions/47903/udp-vs-tcp-how-much-faster-is-it
For fun, I looked for some latency benchmarking tests. I came across this
<https://github.com/rigtorp/ipc-bench> . He includes no UDP test, so I
added one (submitted as a pull request to his repo; in the meantime you can
see my forked version here <https://github.com/totalgee/ipc-bench> ). A
quick test of the TCP and (now) UDP latency tests, give results (on my
MacBook Air) such as:
On my machine, the UDP/TCP latencies tend to be very similar, for a given
message size and iteration count.
Note that for the above test, the UNIX pipe latency was a mere 5400 ns
whereas UNIX domain sockets achieved about 7300 ns, about 2-3 times faster
than using localhost (TCP or UDP) network sockets. Still, 18 microseconds
isn't too bad either...
Also note that it would be useful to look at the min and max latencies, not
just average. If you only send one small packet, you'll see that the
latency can be quite large, around a couple of hundred microseconds. The
average latencies go up when you do fewer roundtrips in a burst (i.e. this
test is not exactly representative of how SC would be sending data).
Still, it might be useful, especially to see that (on my machine at least)
the results look quite similar for TCP and UDP.
Glen.
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/TCP-default-tp7629613p7629627.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/