codehosting connection time is load dependent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.sshserver |
Triaged
|
Low
|
Unassigned |
Bug Description
It appears that the twisted SSH server takes significantly longer to ssh handshake when there are multiple simultaneous requests.
I don't fully understand what is going on here, but I'll give the symptoms.
Note that these results are independent of the lp-forking-service being available. So it appears to be a twisted issue.
I have a script that can spawn a variable number of 'ssh' connections simultaneously, and then issue a very simple bzr request onto that connection. If I set the load factor to 1 (only spawn 1 connection at a time) I get speeds like this:
Spawned 11 connections in 31.936s
average time: 2.898s
If I set the load factor to 2, the time changes to:
Spawned 16 connections in 32.092s
average time: 3.982s
If I set it up to 5, it looks like:
Spawned 43 connections in 63.078s
average time: 7.224s
And at load 10:
Spawned 52 connections in 68.676s
average time: 12.888s
It also tends to be *very* batch. I wait 0.1s between each spawned connection, but they tend to hang for a while, and then all respond at once.
For contrast, I did the same thing, but just to the loopback on carob.
Load 1:
Spawned 61 connections in 60.170s
average time: 0.982s
Load 10:
Spawned 562 connections in 60.821s
average time: 0.971s
Which shows 0 load dependence.
So the contrast is that with 10 simultaneous connections, it takes ~4x longer to get the connection with Twisted.
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: |
added: codehosting-ssh removed: codehosting |
affects: | launchpad → lazr.sshserver |
I'm attaching the script I was using for load testing. It basically does:
echo hello | ssh $HOST bzr serve --inet --directory=/ --allow-writes
In as many parallel processes as you ask it to. (by using --load=$X,)