libvirt/src/remote
Daniel P. Berrangé 829142699e remote: make ssh-helper massively faster
It was reported that the performance of tunnelled migration and
volume upload/download regressed in 6.9.0, when the virt-ssh-helper
is used for remote SSH tunnelling instead of netcat.

When seeing data available to read from stdin, or the socket,
the current code will allocate at most 1k of extra space in
the buffer it has.

After writing data to the socket, or stdout, if more than 1k
of extra space is in the buffer, it will reallocate to free
up that space.

This results in a huge number of mallocs when doing I/O, as
well as a huge number of syscalls since at most 1k of data
will be read/written at a time.

Also if writing blocks for some reason, it will continue to
read data with no memory bound which is bad.

This changes the code to use a 1 MB fixed size buffer in each
direction. If that buffer becomes full, it will update the
watches to stop reading more data. It will never reallocate
the buffer at runtime.

This increases the performance by orders of magnitude.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-26 10:14:18 +00:00
..
libvirtd-admin.socket.in
libvirtd-ro.socket.in
libvirtd-tcp.socket.in
libvirtd-tls.socket.in
libvirtd.aug.in
libvirtd.conf.in daemon: Fix a comment typo in libvirtd.conf.in 2020-09-11 14:55:59 -06:00
libvirtd.confd
libvirtd.init.in
libvirtd.libxl.logrotate.in
libvirtd.logrotate.in
libvirtd.lxc.logrotate.in
libvirtd.policy
libvirtd.qemu.logrotate.in
libvirtd.rules
libvirtd.sasl
libvirtd.service.in
libvirtd.socket.in remote: use SocketMode=0600 when polkit is not compiled 2020-09-03 11:13:25 +01:00
libvirtd.sysconf
libvirtd.sysctl
lxc_protocol.x
meson.build remote: introduce virt-ssh-helper binary 2020-09-09 16:46:22 +01:00
qemu_protocol.x
remote_daemon_config.c remote: use g_new0 instead of VIR_ALLOC 2020-10-08 19:19:22 +02:00
remote_daemon_config.h
remote_daemon_dispatch.c remote: Implement OpenSSH authorized key file mgmt APIs 2020-11-18 16:18:25 +01:00
remote_daemon_dispatch.h
remote_daemon_stream.c remote: use g_new0 instead of VIR_ALLOC 2020-10-08 19:19:22 +02:00
remote_daemon_stream.h
remote_daemon.c virnetdaemon: Wait for "daemon-stop" thread to finish before quitting 2020-11-24 17:52:54 +01:00
remote_daemon.h
remote_driver.c virDomainAuthorizedSSHKeysSet: Use uint for @nkeys 2020-11-23 13:35:16 +01:00
remote_driver.h
remote_protocol.x remote: Implement OpenSSH authorized key file mgmt APIs 2020-11-18 16:18:25 +01:00
remote_sockets.c remote: slightly improve debugging of socket selection 2020-09-18 11:33:40 +01:00
remote_sockets.h remote: extract logic for determining daemon to connect to 2020-09-09 16:46:22 +01:00
remote_ssh_helper.c remote: make ssh-helper massively faster 2020-11-26 10:14:18 +00:00
test_libvirtd.aug.in remote: adapt augeas test case for dynamic polkit config change 2020-09-03 16:37:17 +01:00
virt-guest-shutdown.target remote: Add libvirtd dependency to virt-guest-shutdown.target 2020-11-04 16:26:27 -07:00
virtproxyd.confd
virtproxyd.init.in
virtproxyd.service.in
virtproxyd.sysconf