Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Slow SSH negotiation (takes ~1 second extra to connect to workspace) #2414

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

Closed
mafredri opened this issue Jun 16, 2022 · 5 comments
Closed

Slow SSH negotiation (takes ~1 second extra to connect to workspace) #2414

mafredri opened this issue Jun 16, 2022 · 5 comments
Assignees
Labels
api Area: HTTP API stale This issue is like stale bread.

Comments

@mafredri
Copy link
Member

I'm noticing that coder ssh work and ssh coder.work take longer than I'd expect before the prompt is available. There's ~1 second of extra overhead.

Just to confirm that there's nothing odd with my network, I took a Wireshark capture and have attached the CSV here: wireshark.csv

I don't see anything out of the ordinary, there's just WebSocket chatter going back and forth until we establish DTLS ~1 second later.

For comparison, here is a timing of SSH into a coder workspace, and a VM running on the same NAS.

❯ time ssh coder.work echo hi; time ssh vm echo hi
hi
ssh coder.work echo hi  0.01s user 0.01s system 0% cpu 1.641 total
hi
ssh vm echo hi  0.14s user 0.01s system 45% cpu 0.337 total

And it doesn't really have to be across the network either, I see the same with Coder running in Docker on a local machine.

@ketang
Copy link
Contributor

ketang commented Jun 16, 2022

Can you run it with strace or attach a debugger?

@kylecarbs
Copy link
Member

#2779 will fix this!

@kylecarbs kylecarbs self-assigned this Aug 24, 2022
@kylecarbs kylecarbs added bug api Area: HTTP API labels Aug 24, 2022
@bpmct
Copy link
Member

bpmct commented Sep 19, 2022

Closing as completed by #2779.

ssh coder.tinker echo hi  0.01s user 0.01s system 0% cpu 1.698 total
ssh vm echo hi  0.04s user 0.01s system 4% cpu 1.053 total

@bpmct bpmct closed this as completed Sep 19, 2022
@mafredri
Copy link
Member Author

@bpmct I still see this behavior even with v0.8.15, although I don't know if there's much we can do about improving it.

ssh coder.work exit  0.01s user 0.01s system 1% cpu 1.288 total
ssh vm exit  0.04s user 0.01s system 18% cpu 0.227 total

Still takes 1s longer to ssh into the Coder workspace.

Another thing I've noticed is that occasionally connections can start taking up to 8s for me (even on local network). This happens with Tailscale/WireGuard too. The only thing that seems to resolve the issue is rebooting my MacBook. Nothing else seems to help so this would suggest some bad routes somehow get locked in and used exclusively until reset by a system reboot.

@bpmct bpmct reopened this Sep 19, 2022
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Nov 19, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

4 participants