[libvirt] [PATCH v1] libvirtd: Increase NL buffer size for lots of interface

Michal Privoznik mprivozn at redhat.com
Wed Dec 16 15:24:27 UTC 2015


On 10.12.2015 07:34, Leno Hou wrote:
> 1. When switching CPUs to offline/online in a system more than 128 cpus
> 2. When using virsh to destroy domain in a system with more interface
> 
> All of above happens nl_recv returned with error: No buffer space available.
> This patch set socket buffer size to 128K and turn on message peeking for nl_recv,
> as this would solve this problem totally and permanetly.
> LTC-Bugzilla: #133359 #125768
> 
> Signed-off-by: Leno Hou <houqy at linux.vnet.ibm.com>
> Cc: Wenyi Gao <wenyi at linux.vnet.ibm.com>
> ---
>  src/util/virnetlink.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
> index 679b48e..c8c9fe0 100644
> --- a/src/util/virnetlink.c
> +++ b/src/util/virnetlink.c
> @@ -696,6 +696,14 @@ virNetlinkEventServiceStart(unsigned int protocol, unsigned int groups)
>          goto error_server;
>      }
>  
> +    if (nl_socket_set_buffer_size(srv->netlinknh, 131702, 0) < 0) {
> +        virReportSystemError(errno,
> +                "%s",_("cannot set netlink socket buffer size to 128k"));
> +        goto error_server;
> +    }
> +
> +    nl_socket_enable_msg_peek(srv->netlinknh);
> +
>      if ((srv->eventwatch = virEventAddHandle(fd,
>                                               VIR_EVENT_HANDLE_READABLE,
>                                               virNetlinkEventCallback,
> 

I believe this patch appears over and over again. Usually, the problem
was in libnl library we use and this was just a workaround. Can you test
with the latest libnl version (probably even GIT HEAD) and see if that
helps?

Michal




More information about the libvir-list mailing list