[libvirt PATCH 0/2] fix regression in SSH tunnelling performance

Daniel P. Berrangé posted 2 patches 3 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20201125180427.132863-1-berrange@redhat.com
src/remote/remote_ssh_helper.c | 113 ++++++++++++++++++++-------------
src/util/vireventglib.c        |  29 ++++++---
2 files changed, 89 insertions(+), 53 deletions(-)
[libvirt PATCH 0/2] fix regression in SSH tunnelling performance
Posted by Daniel P. Berrangé 3 years, 5 months ago
In testing the "vol-download" command in virsh, downloading a
1G file takes a ridiculous amount of time (minutes) with the
new SSH helper.

After the first patch is applied the time gets down to a much
more reasonable 5.5 seconds on my test machine.

By comparison netcat achieved 4 seconds.

After applying the second patch, the time is reduced to 3.5
seconds, so we actually end up beating netcat, as long as
we have glib >= 2.64.0 available.

Daniel P. Berrangé (2):
  remote: make ssh-helper massively faster
  util: avoid glib event loop workaround where possible

 src/remote/remote_ssh_helper.c | 113 ++++++++++++++++++++-------------
 src/util/vireventglib.c        |  29 ++++++---
 2 files changed, 89 insertions(+), 53 deletions(-)

-- 
2.25.4


Re: [libvirt PATCH 0/2] fix regression in SSH tunnelling performance
Posted by Christian Ehrhardt 3 years, 5 months ago
On Wed, Nov 25, 2020 at 7:04 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> In testing the "vol-download" command in virsh, downloading a
> 1G file takes a ridiculous amount of time (minutes) with the
> new SSH helper.
>
> After the first patch is applied the time gets down to a much
> more reasonable 5.5 seconds on my test machine.
>
> By comparison netcat achieved 4 seconds.
>
> After applying the second patch, the time is reduced to 3.5
> seconds, so we actually end up beating netcat, as long as
> we have glib >= 2.64.0 available.
>
> Daniel P. Berrangé (2):
>   remote: make ssh-helper massively faster
>   util: avoid glib event loop workaround where possible

I tested both patches and they didn't bring any new regressions as far
as my tests went.
The former issues of slow migration and vol-download are fixed and
speed is now roughly on-par with the old netcat mode.

Tested:
- vol-download local
- vol-download remote
- migration with explicit native transfer ?proxy=native
- migration with auto-mode selection
- virsh console

I also tested migrations with between patched and older versions:
- patched <-> 6.6 - fall back to netcat (expected and ok).
- patched -> 6.9 - slow (as before)
- 6.9 -> patched - fast (which is good as upgrade paths use migration
and it is sufficient to upgrade the target)

Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

Thank you Daniel!

>  src/remote/remote_ssh_helper.c | 113 ++++++++++++++++++++-------------
>  src/util/vireventglib.c        |  29 ++++++---
>  2 files changed, 89 insertions(+), 53 deletions(-)
>
> --
> 2.25.4
>
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd


Re: [libvirt PATCH 0/2] fix regression in SSH tunnelling performance
Posted by Daniel Henrique Barboza 3 years, 5 months ago

On 11/25/20 3:04 PM, Daniel P. Berrangé wrote:
> In testing the "vol-download" command in virsh, downloading a
> 1G file takes a ridiculous amount of time (minutes) with the
> new SSH helper.
> 
> After the first patch is applied the time gets down to a much
> more reasonable 5.5 seconds on my test machine.
> 
> By comparison netcat achieved 4 seconds.
> 
> After applying the second patch, the time is reduced to 3.5
> seconds, so we actually end up beating netcat, as long as
> we have glib >= 2.64.0 available.


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>


Given the annoyance of the regression it fixes I believe it's worth
pushing it through the release freeze.


Thanks,

DHB


> 
> Daniel P. Berrangé (2):
>    remote: make ssh-helper massively faster
>    util: avoid glib event loop workaround where possible
> 
>   src/remote/remote_ssh_helper.c | 113 ++++++++++++++++++++-------------
>   src/util/vireventglib.c        |  29 ++++++---
>   2 files changed, 89 insertions(+), 53 deletions(-)
>