numa 支持吗

虚拟化 虚拟化 1843 人阅读 | 6 人回复 | 2021-04-16


root@deepin-PC:/huayunLocalStorage/cjx/vmtst# virsh  create mouse_tst.xml
error: Failed to create domain from mouse_tst.xml
error: 内部错误:process exited while connecting to monitor: 2021-04-16T05:50:13.347253Z qemu-system-sw64.new: -numa node,nodeid=0,cpus=0-63,mem=4096: NUMA is not supported by this machine-type



  1. <domain type="kvm">
  2.   <name>mouse_tst</name>
  3.   <maxMemory slots='128' unit='KiB'>536870912</maxMemory>
  4.   <memory unit='KiB'>2097152</memory>
  5.   <currentMemory unit='KiB'>2097152</currentMemory>
  6.   <vcpu placement='static' current='2'>64</vcpu>
  7.   <os>
  8.     <type machine="sw6b">hvm</type>
  9.     <kernel>/var/qemu-kvm/vmlinux-qxl</kernel>
  10.     <cmdline>root=/dev/vda1 rw console=ttyS0  ignore_loglevel</cmdline>
  11.     <boot dev="cdrom"/>
  12.     <boot dev="hd"/>
  13.   </os>
  14.   <features>
  15.     <acpi/>
  16.     <apic/>
  17.   </features>
  18.   <clock offset="utc">
  19.     <timer name="pit" tickpolicy="delay"/>
  20.     <timer name="rtc" tickpolicy="catchup"/>
  21.   </clock>
  22.   <cpu mode="host-model" match="exact">
  23.     <numa>
  24.       <cell id='0' cpus='0-63' memory='4194304' unit='KiB'/>
  25.     </numa>

  26.     <topology sockets="64" cores="1" threads="1"/>
  27.   </cpu>
  28.   <iothreads>0</iothreads>
  29.   <iothreadids/>
  30.   <qemu:commandline xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0"/>
  31.   <devices>
  32.     <emulator>/usr/local/bin/qemu-system-sw64</emulator>
  33.     <graphics type="vnc" autoport="yes" keymap="en-us" listen="0.0.0.0"/>
  34.     <video>
  35.       <model type="virtio"/>
  36.     </video>
  37.     <disk type="file" device="disk">
  38.       <driver name="qemu" type="qcow2" cache="none" io="native"/>
  39.       <source file="/huayunLocalStorage/cjx/vmtst/mouse_tst.img"/>
  40.       <target bus="virtio" dev="vda"/>
  41.     </disk>

  42.     <interface type='network'>
  43.       <source network='default'/>
  44.       <model type='virtio'/>
  45.     </interface>

  46.     <serial type="pty"/>
  47.     <channel type="unix">
  48.       <source mode="bind" path="/var/lib/libvirt/qemu/9e895ed6-5504-4ab6-9668-8926341e1f03.agent"/>
  49.       <target type="virtio" name="org.qemu.guest_agent.1"/>
  50.     </channel>
  51.     <memballoon model="virtio">
  52.       <stats period="10"/>
  53.     </memballoon>

  54.     <input type="keyboard" bus="virtio"/>
  55.     <input type="tablet" bus="virtio"/>


  56.   </devices>
  57. </domain>
复制代码


回复

使用道具 举报

回答|共 6 个

TecSupport

发表于 2021-4-16 15:23:59 | 显示全部楼层

本帖最后由 TecSupport 于 2021-4-16 15:46 编辑

默认是支持numa的。只是通用版本内核不支持numa在grub中开关,在最新版本的内核支持grub中打开numa开关
回复

使用道具 举报

TecSupport

发表于 2021-4-16 15:43:16 | 显示全部楼层

可以从源仓库安装numa相关包:
apt install libnuma-dev numactl

numactl -H可以查看numa是否已经开启
numastat 可以查看是否开启
回复

使用道具 举报

Hex

发表于 2021-4-16 20:08:32 | 显示全部楼层

TecSupport 发表于 2021-4-16 15:23
默认是支持numa的。只是通用版本内核不支持numa在grub中开关,在最新版本的内核支持grub中打开numa开关
...

这个问题是:虚拟化是否支持NUMA。

据我所知目前还不支持。
回复

使用道具 举报

TecSupport

发表于 2021-4-17 17:04:56 | 显示全部楼层

Hex 发表于 2021-4-16 20:08
这个问题是:虚拟化是否支持NUMA。

据我所知目前还不支持。

我能不能理解为,物理机内核默认配置文件打开numa选项且支持,虚拟机不支持numa?
回复

使用道具 举报

Hex

发表于 2021-4-19 16:33:20 | 显示全部楼层

TecSupport 发表于 2021-4-17 17:04
我能不能理解为,物理机内核默认配置文件打开numa选项且支持,虚拟机不支持numa? ...

跟内核配置无关。注意看原始的问题,他使用virsh创建一个NUMA配置的虚拟机报错了,因为申威的qemu+kvm还不支持创建这样的虚拟机
回复

使用道具 举报

TecSupport

发表于 2021-4-19 17:21:09 | 显示全部楼层

Hex 发表于 2021-4-19 16:33
跟内核配置无关。注意看原始的问题,他使用virsh创建一个NUMA配置的虚拟机报错了,因为申威的qemu+kvm还 ...

明白,感谢大神答复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则