Package: libvirt-daemon Version: 2.4.0-1+b1 Severity: normal Tags: patch Dear Maintainer,
Pinning domain processes and vCPUs to physical CPUs increases cache efficiency [0]. One can add a ‘cpuset’ attribute to the <vcpu> element to explicitely list physical CPU numbers [1]; however I find it more flexible to specify a placement *mode* instead, and let libvirtd query numad(8) to find the best alignment for the guest's CPUs and memory resources. Unfortunately adding the following snippet yields "numad is not available on this host" and the domain refuses to start. <vcpu placement='auto'>2</vcpu> <numatune> <memory mode='preferred' placement='auto'/> </numatune> It turns out that while libvirtd is compiled with --with-numactl, it's missing --with-numad. The enclosed patch passes this flag, and adds ‘numad’ to Build-Depends and libvirt-daemon's Suggests. I also had to regorganize the PATH in which to search for the numad binary, probably because I use split-usr. (Without the second patch, the binary is hardcoded to /bin/numad while the numad package ships /usr/bin/numad instead.) Thanks for maintaining libvirt in Debian! Cheers -- Guilhem. [0] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Virtualization_Tuning_and_Optimization_Guide/index.html#chap-Virtualization_Tuning_Optimization_Guide-NUMA [1] https://libvirt.org/formatdomain.html#elementsCPUAllocation -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (990, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.8.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages libvirt-daemon depends on: ii libapparmor1 2.10.95-6 ii libaudit1 1:2.6.7-1 ii libavahi-client3 0.6.32-1 ii libavahi-common3 0.6.32-1 ii libblkid1 2.29-1 ii libc6 2.24-5 ii libcap-ng0 0.7.7-3 ii libdbus-1-3 1.10.12-1 ii libdevmapper1.02.1 2:1.02.133-1 ii libfuse2 2.9.7-1 ii libgnutls30 3.5.5-6 ii libnetcf1 1:0.2.8-1+b1 ii libnl-3-200 3.2.27-1 ii libnl-route-3-200 3.2.27-1 ii libnuma1 2.0.11-2 ii libparted2 3.2-16+b1 ii libpcap0.8 1.8.1-3 ii libpciaccess0 0.13.4-1 ii librados2 0.80.11-1.1 ii librbd1 0.80.11-1.1 ii libsasl2-2 2.1.27~72-g88d82a3+dfsg-1 ii libselinux1 2.6-3 ii libssh2-1 1.7.0-1 ii libudev1 232-2 ii libvirt0 2.4.0-1+b1 ii libxen-4.8 4.8.0~rc3-1 ii libxenstore3.0 4.8.0~rc3-1 ii libxml2 2.9.4+dfsg1-2.1 ii libyajl2 2.1.0-2 Versions of packages libvirt-daemon recommends: pn libxml2-utils <none> ii netcat-openbsd 1.105-7 ii qemu-kvm 1:2.7+dfsg-3+b1 Versions of packages libvirt-daemon suggests: ii libvirt-daemon-system 2.4.0-1+b1 -- no debconf information
diff --git a/debian/control b/debian/control index 3b8dd8e..bc36ead 100644 --- a/debian/control +++ b/debian/control @@ -34,6 +34,7 @@ Build-Depends: libyajl-dev, libpcap0.8-dev, libnuma-dev [amd64 arm64 i386 ia64 mips mipsel powerpc ppc64 ppc64el], + numad [amd64 arm64 i386 ia64 mips mipsel powerpc ppc64 ppc64el], radvd [linux-any], libnetcf-dev (>= 1:0.2.3-3~) [linux-any], libsanlock-dev [linux-any], @@ -106,6 +107,7 @@ Recommends: netcat-openbsd, Suggests: libvirt-daemon-system, + numad, Description: Virtualization daemon Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). The library aims at providing diff --git a/debian/rules b/debian/rules index ec557c4..6e0a416 100755 --- a/debian/rules +++ b/debian/rules @@ -45,9 +45,9 @@ ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux)) WITH_DTRACE = --without-dtrace endif ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 arm64 i386 ia64 mips mipsel powerpc ppc64el)) - WITH_NUMA = --with-numactl + WITH_NUMA = --with-numactl --with-numad else - WITH_NUMA = --without-numactl + WITH_NUMA = --without-numactl --without-numad endif ifneq (,$(findstring $(DEB_HOST_ARCH), ia64)) WITH_LXC = --without-lxc @@ -68,7 +68,7 @@ else WITH_MACVTAP = --without-macvtap WITH_NETWORK = --without-network WITH_LXC = --without-lxc - WITH_NUMA = --without-numactl + WITH_NUMA = --without-numactl --without-numad WITH_NETCF = --without-netcf WITH_INIT_SCRIPT = --with-init-script=none WITH_SYSTEMD = --without-systemd-daemon -- 2.10.2
diff --git a/configure.ac b/configure.ac index dfc536f..bde6bbd 100644 --- a/configure.ac +++ b/configure.ac @@ -1501,7 +1501,7 @@ AC_ARG_WITH([numad], if test "$with_numad" != "no" ; then fail=0 - AC_PATH_PROG([NUMAD], [numad], [], [/bin:/usr/bin:/usr/sbin]) + AC_PATH_PROG([NUMAD], [numad], [], [/usr/bin:/bin:/usr/sbin]) if test "$with_numad" = "check"; then test "$with_numactl" = "yes" || fail=1 -- 2.10.2
signature.asc
Description: PGP signature