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

High latency observed on ping/pong test with low message rates #1674

Closed
YuanYuYuan opened this issue Dec 17, 2024 · 1 comment
Closed

High latency observed on ping/pong test with low message rates #1674

YuanYuYuan opened this issue Dec 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@YuanYuYuan
Copy link
Contributor

Describe the bug

As titled.

  • The normal
32 bytes: seq=94 rtt=40µs lat=20µs
32 bytes: seq=95 rtt=39µs lat=19µs
32 bytes: seq=96 rtt=47µs lat=23µs
32 bytes: seq=97 rtt=43µs lat=21µs
32 bytes: seq=98 rtt=42µs lat=21µs
32 bytes: seq=99 rtt=42µs lat=21µs
  • After applying the patch
32 bytes: seq=93 rtt=343µs lat=171µs
32 bytes: seq=94 rtt=393µs lat=196µs
32 bytes: seq=95 rtt=423µs lat=211µs
32 bytes: seq=96 rtt=368µs lat=184µs
32 bytes: seq=97 rtt=652µs lat=326µs
32 bytes: seq=98 rtt=550µs lat=275µs
32 bytes: seq=99 rtt=418µs lat=209µs

To reproduce

diff --git a/examples/examples/z_ping.rs b/examples/examples/z_ping.rs
index 9f715ea15..d0ccbc0ec 100644
--- a/examples/examples/z_ping.rs
+++ b/examples/examples/z_ping.rs
@@ -56,6 +56,7 @@ fn main() {
     }
 
     for _ in 0..n {
+        std::thread::sleep(std::time::Duration::from_millis(200));
         let data = data.clone();
         let write_time = Instant::now();
         publisher.put(data).wait().unwrap();

System info

@YuanYuYuan YuanYuYuan added the bug Something isn't working label Dec 17, 2024
@YuanYuYuan YuanYuYuan changed the title High latency is observed if there's an additional sleep during the sleep High latency is observed if there's an additional sleep in the ping loop Dec 17, 2024
@YuanYuYuan YuanYuYuan changed the title High latency is observed if there's an additional sleep in the ping loop High latency observed on ping/pong test with low message rates Dec 17, 2024
@YuanYuYuan
Copy link
Contributor Author

This is an identified issue due to cache or OS scheduling issues. See this report for more details. https://zenoh.io/blog/2021-07-13-zenoh-performance-async/#peer-to-peer-communication

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant