mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-13 09:39:17 +00:00
829142699e
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> |
||
---|---|---|
.. | ||
libvirtd-admin.socket.in | ||
libvirtd-ro.socket.in | ||
libvirtd-tcp.socket.in | ||
libvirtd-tls.socket.in | ||
libvirtd.aug.in | ||
libvirtd.conf.in | ||
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 | ||
libvirtd.sysconf | ||
libvirtd.sysctl | ||
lxc_protocol.x | ||
meson.build | ||
qemu_protocol.x | ||
remote_daemon_config.c | ||
remote_daemon_config.h | ||
remote_daemon_dispatch.c | ||
remote_daemon_dispatch.h | ||
remote_daemon_stream.c | ||
remote_daemon_stream.h | ||
remote_daemon.c | ||
remote_daemon.h | ||
remote_driver.c | ||
remote_driver.h | ||
remote_protocol.x | ||
remote_sockets.c | ||
remote_sockets.h | ||
remote_ssh_helper.c | ||
test_libvirtd.aug.in | ||
virt-guest-shutdown.target | ||
virtproxyd.confd | ||
virtproxyd.init.in | ||
virtproxyd.service.in | ||
virtproxyd.sysconf |