[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] TCP default?



… sometimes each of these messages is an OSC bundle with a few messages.

> On 20.12.2016, at 19:57, Julian Rohrhuber <julian.rohrhuber@xxxxxxxxxxxxxxxxxx> wrote:
> 
> no, normally they come incrementally,
> 
> (
> var dt = 1/1000;
> fork { loop { dt.wait; s.sendBundle(0.2, ["/s_new", etc… ]) } };
> )
> 
> 
>> On 20.12.2016, at 20:20, amindfv@xxxxxxxxx wrote:
>> 
>> Julian -- are the granular synthesis messages typically "batched" into bundles?
>> 
>> Tom
>> 
>> 
>>> El 20 dic 2016, a las 11:51, Julian Rohrhuber <julian.rohrhuber@xxxxxxxxxxxxxxxxxx> escribió:
>>> 
>>> that would be great. High density of small messages seems an important parameter (think granular synthesis, > 1000 messages/sec). Maybe you can add a test for broadcasting, too.
>>> 
>>> 
>>>> On 20.12.2016, at 16:37, amindfv@xxxxxxxxx wrote:
>>>> 
>>>> Thanks for the first batch of numbers, Glen!
>>>> 
>>>> I see very similar results testing TCP vs UDP in general (ie a ~0-3% time increase for TCP). I'm working on some simple SC tests too.
>>>> 
>>>> tom
>>>> 
>>>> 
>>>>> El 20 dic 2016, a las 08:11, Glen Fraser <holaglen@xxxxxxxxx> escribió:
>>>>> 
>>>>> Hmm, not sure why the test results didn’t show up in my mail (they do appear in the Nabble forum)… For the record, they should have read:
>>>>> 
>>>>> ./tcp_lat
>>>>> 100 10000
>>>>> message size: 100 octets
>>>>> roundtrip count: 10000
>>>>> average latency: 17770 ns
>>>>> ./
>>>>> udp_lat
>>>>> 100 10000
>>>>> message size: 100 octets
>>>>> roundtrip count: 10000
>>>>> average latency: 17528 ns
>>>>> 
>>>>> 
>>>>> 
>>>>>> On 20 Dec 2016, at 15:07, Glen Fraser <holaglen@xxxxxxxxx> wrote:
>>>>>> 
>>>>>> 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/
>>> 
>> 
>> _______________________________________________
>> 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/
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail