1
0
Fork 0

some optimizations

This commit is contained in:
Massaki Archambault 2020-03-25 12:03:09 -04:00
parent 012b674daa
commit 3fc57c2279
3 changed files with 21 additions and 4 deletions

View File

@ -10,6 +10,7 @@
<currentMemory unit='KiB'>16777216</currentMemory> <currentMemory unit='KiB'>16777216</currentMemory>
<memoryBacking> <memoryBacking>
<hugepages/> <hugepages/>
<locked/>
</memoryBacking> </memoryBacking>
<vcpu placement='static'>6</vcpu> <vcpu placement='static'>6</vcpu>
<iothreads>1</iothreads> <iothreads>1</iothreads>
@ -22,6 +23,9 @@
<vcpupin vcpu='5' cpuset='7'/> <vcpupin vcpu='5' cpuset='7'/>
<emulatorpin cpuset='0,4'/> <emulatorpin cpuset='0,4'/>
<iothreadpin iothread='1' cpuset='0,4'/> <iothreadpin iothread='1' cpuset='0,4'/>
<vcpusched vcpus='0-5' scheduler='fifo' priority='99'/>
<emulatorsched scheduler='fifo' priority='99'/>
<iothreadsched iothreads='1' scheduler='fifo' priority='99'/>
</cputune> </cputune>
<os> <os>
<type arch='x86_64' machine='pc-q35-4.1'>hvm</type> <type arch='x86_64' machine='pc-q35-4.1'>hvm</type>
@ -33,14 +37,18 @@
<apic/> <apic/>
<hyperv> <hyperv>
<!-- hyper-v enlightments, the more the better --> <!-- hyper-v enlightments, the more the better -->
<!-- https://archive.fosdem.org/2019/schedule/event/vai_enlightening_kvm/ -->
<relaxed state='on'/> <relaxed state='on'/>
<vapic state='on'/> <vapic state='on'/>
<spinlocks state='on' retries='8191'/> <spinlocks state='on' retries='8191'/>
<vpindex state='on'/> <vpindex state='on'/>
<synic state='on'/> <synic state='on'/>
<stimer state='on'/> <stimer state='on'/>
<tlbflush state='on'/>
<ipi state='on'/>
<reset state='on'/> <reset state='on'/>
<frequencies state='on'/> <frequencies state='on'/>
<reenlightenment state='on'/>
<!-- nvidia code 43 fix --> <!-- nvidia code 43 fix -->
<vendor_id state='off' value='fNvidia'/> <vendor_id state='off' value='fNvidia'/>
</hyperv> </hyperv>
@ -54,6 +62,7 @@
<cpu mode='host-passthrough' check='none'> <cpu mode='host-passthrough' check='none'>
<topology sockets='1' cores='3' threads='2'/> <topology sockets='1' cores='3' threads='2'/>
<cache mode='passthrough'/> <cache mode='passthrough'/>
<feature policy='require' name='invtsc'/>
</cpu> </cpu>
<clock offset='localtime'> <clock offset='localtime'>
<timer name='rtc' present='no' tickpolicy='catchup'/> <timer name='rtc' present='no' tickpolicy='catchup'/>
@ -65,7 +74,7 @@
</clock> </clock>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot> <on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash> <on_crash>restart</on_crash>
<pm> <pm>
<suspend-to-mem enabled='no'/> <suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/> <suspend-to-disk enabled='no'/>
@ -81,7 +90,7 @@
</disk> </disk>
<disk type='block' device='disk'> <disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap' detect_zeroes='unmap'/> <driver name='qemu' type='raw' cache='none' io='native' discard='unmap' detect_zeroes='unmap'/>
<source dev='/dev/disk/by-id/nvme-CT1000P1SSD8_1910E1F03D8E'/> <source dev='/dev/nvme0n1'/>
<target dev='sdc' bus='scsi'/> <target dev='sdc' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk> </disk>
@ -162,15 +171,17 @@
</interface> </interface>
<input type='mouse' bus='ps2'/> <input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/> <input type='keyboard' bus='ps2'/>
<sound model='ich6'> <sound model='ich9'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
</sound> </sound>
<!--
<hostdev mode='subsystem' type='pci' managed='yes'> <hostdev mode='subsystem' type='pci' managed='yes'>
<source> <source>
<address domain='0x0000' bus='0x00' slot='0x1f' function='0x6'/> <address domain='0x0000' bus='0x00' slot='0x1f' function='0x6'/>
</source> </source>
<address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
</hostdev> </hostdev>
-->
<hostdev mode='subsystem' type='pci' managed='yes'> <hostdev mode='subsystem' type='pci' managed='yes'>
<source> <source>
<address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>

View File

@ -85,10 +85,16 @@
- name: install qemu hook - name: install qemu hook
copy: copy:
src: qemu_hook src: hooks/qemu
dest: /etc/libvirt/hooks/qemu dest: /etc/libvirt/hooks/qemu
mode: '755' mode: '755'
- name: configure systemd CPUAffinity
lineinfile:
path: /etc/systemd/system.conf
regexp: '^#?CPUAffinity'
line: 'CPUAffinity=0 4'
- name: enable libvirtd.socket - name: enable libvirtd.socket
systemd: systemd:
name: libvirtd.socket name: libvirtd.socket