Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index a04f888e06..fdacd17890 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c
> @@ -282,6 +282,18 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags)
>
>      ret->cmd = virCommandNewArgList(iohelper_path, name, NULL);
>
> +    if (flags & VIR_FILE_WRAPPER_BIG_PIPE) {
> +        /*
> +         * virsh save/resume would slow to a crawl with a default pipe size (usually 64k).
> +         * This improves the situation by 400%, although going through io_helper still incurs
> +         * in a performance penalty compared with a direct qemu migration to a socket.
> +         */
> +        int pipe_sz, rv = virFileReadValueInt(&pipe_sz, "/proc/sys/fs/pipe-max-size");
> +        if (rv != 0) {
> +            pipe_sz = 1024 * 1024; /* common default for pipe-max-size */
> +        }
> +        fcntl(pipefd[output ? 0 : 1], F_SETPIPE_SZ, pipe_sz);
> +    }

I believe this entire hunk of code should be ifdef'd within #ifdef
__linux__. non-windows does not necessarily mean only linux.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux