Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twping send speed issue #61

Open
McRender opened this issue Sep 6, 2019 · 2 comments
Open

Twping send speed issue #61

McRender opened this issue Sep 6, 2019 · 2 comments
Assignees

Comments

@McRender
Copy link

McRender commented Sep 6, 2019

I was wondering what the packet send interval limitations are in twping. I am trying to reach a send interval below 1 ms. I therefore used the following command to test the limits and made a few observations I can not explain:

twping -c 2600 -s 1400 -i 0.001f -L 0.5 localhost

When using the "fix offset" I'll get a lot of dropped packets. When using the exponentially
distributed pseudo-random quantity I don't see any lost packets (but in general higher RTT compared to the fix offset).

So I've decided to have a closer look at the source code and found the following code block:

owamp/owamp/endpoint.c

Lines 3480 to 3485 in 6f365d9

/* Next send real soon now? */
sleeptime = nexttime;
timespecsub(&sleeptime,&currtime);
if(sleeptime.tv_sec == 0 && sleeptime.tv_nsec < 1000000){
goto SKIP_SEND;
}

Especially the following statement does somehow limit the send interval time to 1 ms:

if(sleeptime.tv_sec == 0 && sleeptime.tv_nsec < 1000000){

I've tried to lower this value to 0.5 ms but my max RTT will increase significantly doing so. Is there an explanation for this 1 ms limitation or how can I increase the packet send time to shorter intervals than 1ms?

Would love to hear from you.

@vvidic
Copy link
Contributor

vvidic commented Sep 6, 2019 via email

@McRender
Copy link
Author

McRender commented Sep 6, 2019

Hi Valentin, thanks for the quick info. Correct me if I am wrong, so you are saying that with this implementation of the TWAMP standard it is "currently" not possible to achieve higher send rates than 1000 packets per second?

I am not an expert in network (server and client) development but according to this blog post, it should be possible to achieve over a million packets per second with UDP. In his naive first approach, he was able to send over 370k packets per second on one single thread :-).

What I am trying to do, is to simulate some data patterns (constant flow, variations in send intervals ...) with UDP and measure the round trip time of this pattern to gain some insight of my network performance in means of latency, jitter and so on. I think TWAMP would be a very good candidate for doing so since it is standardized and even responders are available in some network hardware (Juniper, Cisco...).

Let me know if you have some more information on where to look for improvements in the code or even better when you already have plans for doing so. Thanks in advance for your update...

Stephan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

3 participants