Hi,
we installed a new hostsystem a couple weeks ago but have some performance issues in certain vms.
The hostsystem is on 7.4-15 with Kernal 5.15.108-1 and it is primarily used for game / csgo servers. We are running a Ryzen 1700x, 64g ram and 2x 1tb nvme zfs raid1. Inside the vm we run ubuntu server 22 with pterodactyl / docker for the gameservers. The vm has 6 cpu threads and is set to type host.
The first thing we tested was shutting down all other vms on the host which did improve the performance a bit but not even close to where it should be / is on similar hostsystems / setups. Next we tried setting cpu affinity to 0-2,8-10 which should force the vm on the host cpu cores 0, 1 & 2 (the second thread of those physical cores is 8-10 not 3-5), but that didnt change anything.
After additional testing we found out two thing,
- first, it is ignoring the cpu core bind / affinity and always uses threads 0-5 for the vm no matter what is entered (did run stress inside the vm to verify)
- second, it is barely using 50% on any of the assigned host cpu cores even when inside the vm a thread is at 100% see image 1 and 2, on both images the top htop is the host, the bottom one inside the vm and they where taken at the exact same time with htop refreshing 5x/sec, also keep in mind cores 3-5 and 11-13 where assigned to a different vm running a stress test and cores 0-2,8-10 to the problem vm. The problems vm config below images.
This setup is close to driving me nuts after close to a week of troubleshooting, any help appreciated
image 1
image 2
VM Config Problem VM
we installed a new hostsystem a couple weeks ago but have some performance issues in certain vms.
The hostsystem is on 7.4-15 with Kernal 5.15.108-1 and it is primarily used for game / csgo servers. We are running a Ryzen 1700x, 64g ram and 2x 1tb nvme zfs raid1. Inside the vm we run ubuntu server 22 with pterodactyl / docker for the gameservers. The vm has 6 cpu threads and is set to type host.
The first thing we tested was shutting down all other vms on the host which did improve the performance a bit but not even close to where it should be / is on similar hostsystems / setups. Next we tried setting cpu affinity to 0-2,8-10 which should force the vm on the host cpu cores 0, 1 & 2 (the second thread of those physical cores is 8-10 not 3-5), but that didnt change anything.
After additional testing we found out two thing,
- first, it is ignoring the cpu core bind / affinity and always uses threads 0-5 for the vm no matter what is entered (did run stress inside the vm to verify)
- second, it is barely using 50% on any of the assigned host cpu cores even when inside the vm a thread is at 100% see image 1 and 2, on both images the top htop is the host, the bottom one inside the vm and they where taken at the exact same time with htop refreshing 5x/sec, also keep in mind cores 3-5 and 11-13 where assigned to a different vm running a stress test and cores 0-2,8-10 to the problem vm. The problems vm config below images.
- Why is it ignoring affinity and using hostcore 0-5 instead of 0-2,8-10?
- Just for my understanding, each vcore from the vm should have its own progeam thread on the hostsystem, meaning technically a virtual core should be able to use 100% of a hostsystem core, if there is running nothing else on that hostsystem core, correct?
- Also spreading one vm vcore across two or more hostsystem cores to increase vm single core performance is not possible, correct?
- So it is not possible if you look at image1 that the 100% maxed out vm thread was just spread out across hostsystem cores 0-2, correct?
This setup is close to driving me nuts after close to a week of troubleshooting, any help appreciated
image 1
image 2
VM Config Problem VM
Code:
affinity: 0,1,2,8,9,10
boot: order=scsi0;net0
cores: 6
cpu: host
memory: 9000
meta: creation-qemu=7.1.0,ctime=1671810453
name: Redacted-22-server
net0: virtio=RE:PL:AC:ED:00:00,bridge=vmbr2,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: local-zfs:vm-3153-disk-0,discard=on,iothread=1,size=200G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=redacted
sockets: 1
vmgenid: redacted