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

artiq-zynq performance regression with 0.7.0 #415

Closed
sbourdeauducq opened this issue Jan 31, 2021 · 8 comments
Closed

artiq-zynq performance regression with 0.7.0 #415

sbourdeauducq opened this issue Jan 31, 2021 · 8 comments

Comments

@sbourdeauducq
Copy link

See https://git.m-labs.hk/M-Labs/artiq-zynq/issues/127

@Dirbaio
Copy link
Member

Dirbaio commented Jan 31, 2021

Interesting.
Is "H" a Linux machine and "D" a smoltcp device? Assuming so:

  • H2D could be due to Delayed ACK if the rx buffer in the device is small. Can you try disabling it?
  • D2H could be due to tcp: don't send data outside the remote window #387 (but unlikely because the rx buffer in the Linux side is probably huge), or maybe tcp: Add RTT estimation. #406 if the link is lossy (the RTT estimation will probably detect a higher RTO, the previous hardcoded RTO of 100ms was very agressive?).

Could you provide packet captures of before and after? It would help significantly in figuring it out

@astro
Copy link
Contributor

astro commented Feb 8, 2021

Regression occurs since the merge of #404.

@dnadlinger
Copy link
Contributor

@Dirbaio: Just to confirm your interpretation, H would indeed have been a Linux box ("host") running the kernel TCP stack, and D the embedded ARM device running smoltcp.

@Dirbaio
Copy link
Member

Dirbaio commented Feb 8, 2021

Regression occurs since the merge of #404.

Okay, makes sense.

  • How is the workload like? Is it one big transfer in one direction, or many small transfers in request/response fashion? What's the TCP buffer sizes, what's the size of the writes?
  • Can you provide packet capture?
  • Have you tried disabling delayed ACK? socket.set_ack_delay(None)

@dnadlinger
Copy link
Contributor

(@astro/… can hopefully provide details, as I'm only peripherally involved with this.)

@astro
Copy link
Contributor

astro commented Feb 8, 2021

The workload sizes are 1MB, and 1KB, echoed in a request/response fashion. TCP buffer sizes are 64KB.

socket.set_ack_delay(None) mitigated the regression for us. A performance regression in the default settings is still worth investigating, so don't close this issue yet.

@astro
Copy link
Contributor

astro commented Feb 25, 2021

I've done some loopback tests with delay and FaultInjector in an std environment but was not yet able to reproduce throughput differences between running with and without delayed acks.

@Dirbaio
Copy link
Member

Dirbaio commented Jun 6, 2022

It's expected ACK delay causes issues depending on the workload (usually chatty request/response workloads). There's no default settings that will suit everyone, so it's expected people will have to tune them. Also, Linux defaults to ack_delay on FWIW.

If you believe your workload shouldn't be impacted by ack_delay but still get a performance regression, please open a new issue with logs and packet capture.

@Dirbaio Dirbaio closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants