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

packet loss in Qbv Demo 3 Scenario 3 #8

Closed
duiduiba opened this issue Dec 2, 2019 · 3 comments
Closed

packet loss in Qbv Demo 3 Scenario 3 #8

duiduiba opened this issue Dec 2, 2019 · 3 comments

Comments

@duiduiba
Copy link

duiduiba commented Dec 2, 2019

Hi,
I run the demo in Qbv Demo 3 Scenario 3, and the plotted graph image is perfect. But when reading the generated file latencies.dat which was generated by plot.sh, I found some latencies with 999975 or 1000002, or even bigger, such as 16499976. I think it may be caused by packet loss, and is it normal?

Thanks!

@vincentxw
Copy link
Contributor

Depending on the OS or hardware you're running on, yes. The application is trying to send a packet periodically (e.g. every 500us). However, the OS's scheduler might pre-empt the application and perform some operations that take longer than 500us, resulting in a delay in the next packet. These should be the occasional "misses" or outliers you observe.

Our project/apps were tested in a PREEMPT_RT-enabled kernel and was optimized through some BIOS settings and scripts to ensure our application has sufficient priority to run at a interval with no occassional spikes/misses. The specific version it was verified on is documented here:

@duiduiba
Copy link
Author

duiduiba commented Dec 3, 2019

Hi,
Thanks.

I use the command "tc -stats qdisc show dev ens3" and get info below. It seems the kernel drops the pkt in etf_dequeue_timesortedlist.
qdisc etf 80ec: dev ens3 parent 100:1 clockid TAI delta 5000000 offload on deadline_mode off
Sent 49693632 bytes 776463 pkt (dropped 125, overlimits 125 requeues 0)

In fact, I use the RT kernel with kernel version 5.2.21-rt13, and I suspect the hrtimer of ETF is not so accurately in ns.

@duiduiba
Copy link
Author

duiduiba commented Dec 3, 2019

Hi,
I add -E option when running the app, and print the time gap between now and tstamp in the pkt in function process_socket_error_queue of app, and get the diff almost 10ms. I enlarge the waketx_delay of the app to 19ms and delta of the etf qdisc to 20ms, and it won't happen again.

@duiduiba duiduiba closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants