UDP messaging delay

If you have a simple question and just want an answer.
shawza
Junior Member
Posts: 6
Joined: Wed Jun 04, 2014 11:26 am

UDP messaging delay

Post by shawza »

I have set up a small system that streams messages over UDP from one SliceKIT to another.

I noticed the message were taking longer than expected, and did some timing tests.

My streamer was originally based on the UDP reflector detailed in this networking example: https://www.xmos.com/support/appnotes/AN00121

I timed the sends and over 100 sends, the average time taken to complete the send is 46.1ms.

Am really looking for any help here and any amount of light that might be shed on this would be great.


peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

Hi shawza,

There was a performance issue with the version of lib_xtcp that is used in that application note (lib_xtcp 4.0.0). This will been fixed in version 4.0.3. Unfortunately this version is not available on xmos.com yet, but can be found on github: https://github.com/xmos/lib_xtcp.

If you could see whether this improves the performance of your application?

Peter
shawza
Junior Member
Posts: 6
Joined: Wed Jun 04, 2014 11:26 am

Post by shawza »

Hi Peter,

Thank you. I will grab that and test it out. Will post back with results.
shawza
Junior Member
Posts: 6
Joined: Wed Jun 04, 2014 11:26 am

Post by shawza »

Hello thread,

So that worked :D

Looks like the new timings for the transmission are in the 0.46ms region.

Thanks Peter for the help. Do you know exactly what the issue was with the older XTCP module?
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

The issue with lib_xtcp was that a bug had been introduced in porting the code to a new structure such that the TCP clients were only handled when a timer went off. The timer was running at a period of 100ms, so this introduced a lot of latency in handling clients but was not found because it was a performance rather than functionality issue.

You can see the changes made to fix this in the history of xtcp.xc:

https://github.com/xmos/lib_xtcp/commit ... rc/xtcp.xc