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

lagscope reports lower RTT latency in VM (WSL2) than in Windows host if using lagscope as receiver, but vice versa when using latte as receiver #41

Open
wilsonNg007 opened this issue May 23, 2021 · 9 comments

Comments

@wilsonNg007
Copy link

wilsonNg007 commented May 23, 2021

Running two individual experiments:
Running lagscope from WSL2 VM targeting a remote (windows) device.
Running lagscope from the Windows host (of WSL2) targeting the same remote device.

lagscope reports lower RTT latency from WSL2 than from the host. Ran several runs and they all show consistent result. The expected behavior should have been that the host has lower RTT latency than from the VM.

See attached logs below.
winHost_lagscope_100Kpings_run2log.txt
wsl2_lagscope_100Kpings_run2log.txt

I tried with 1M pings (default) and saw the same result as well.

However, using the ping cmd showing the opposite result i.e. the host reports lower RTT latency than the WSL2 VM, which appears expected behavior. See below attached.
winHost_ping_1000pings_32bytes_run0.txt
wsl2_ping_1000pings_32bytes_run0.txt

@glima
Copy link

glima commented May 24, 2021

This is most likely a Windows bug, no? Completely different network stacks involved in each case.

@wilsonNg007
Copy link
Author

WSL2 need to go thru the host via NAT before going out to the wire.

The fact that the previous ping cmd experiment appears showing the expected behavior (i.e. host has lower RTT latency than the VM) indicates that the lagscope may be the highly suspect.

@glima
Copy link

glima commented May 24, 2021

Yeah, would have to profile it to see what's going on--never touched the code myself.

@wilsonNg007
Copy link
Author

Hi @santoshx,

I attached .csv and console output log from both the host and the VM. Are these data sufficient to find out why lagscope reports low RTT latency from VM than from the Host ?

  RTT latency (mean) - lagscope
Windows Host 2980.270us
WSA VM 2814.016us
Difference -166.254us

winHost_lagscope_console_output_run0.txt
winHost_lagscope_rawdata_run0.csv

wsaVM_lagscope_console_output_run0.txt
wsaVM_lagscope_rawdata_run0.csv

@wilsonNg007 wilsonNg007 changed the title lagscope reports lower RTT latency in VM (WSL2) than in the Windows host lagscope reports lower RTT latency in VM (WSL2) than in Windows host if using lagscope as receiver, but vice versa when using latte as receiver Aug 4, 2021
@wilsonNg007
Copy link
Author

wilsonNg007 commented Aug 4, 2021

@simonxiaoss , @santoshx,

I have a new interesting data - If using https://github.com/microsoft/latte running as receiver, I'm getting expected result i.e. window host reported lower RTT latency than in VM.

lagscope as sender --> lagscope as receiver - issue: VM reports lower RTT latency than Host.
lagscope as sender --> latte as receiver - not repro: VM reports higher RTT latency than Host.

There is an address translation logic between host and VM (whether via NAT or FSE), and that for sure has overhead. So it makes logical sense for VM to have higher RTT latency than host.

I'll update with the logs.

@wilsonNg007
Copy link
Author

@santoshx
Copy link
Contributor

santoshx commented Aug 18, 2021

I could not repro this on my first attempt.
I have one Windows laptop as machine 1 and another Windows laptop as machine 2.
Receiver is running on machine 2.
Tried sender from machine 1 directly and sender from machine 1 wsl; both reported same latency.
I'm not concluding that issue isn't there. I'll try few more variations and will get back.
Thanks.

@wilsonNg007
Copy link
Author

Is it WSL or WSL2?

WSL and WSL2 are totally different - https://docs.microsoft.com/en-us/windows/wsl/compare-versions
So it's unlikely you are testing with the right configuration.

FYI, I am using WSA (Windows Subsystem for Android), which is running Microsoft linux kernel, same as WSL2 running microsoft linux kernel.

@santoshx
Copy link
Contributor

Seems like I have the WSL1.
C:>wsl -l -v
NAME STATE VERSION

  • Ubuntu-20.04 Running 1

I'll try with WSL2 and get back.
Thanks.

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

3 participants