Will VMs ever be as fast as on a real system ?

ng4ever

2[H]4U
Joined
Feb 18, 2016
Messages
2,928
I am using VMware workstation latest version, NVMe SSD, and have 32 gb of ram but not all for the VM about 4 gb for the VM

Yes I am on pretty latest hardware too. If you need it I will say.

Just feel like VM's always lag behind in performance no matter what compared to on a real system.
 

cjcox

2[H]4U
Joined
Jun 7, 2004
Messages
2,315
VMware Workstation isn't what I'd call an enterprise hypervisor, it's Type 2. It's an old (very old now) way to create VMs for desktop users.

You could use Linux and Linux KVM and still have a full desktop plus a real Type 1 hypervisor with about a 1% degradation (if that much)

Will VMs lag? They should and that answer should be obvious.


GB (note, below this shows the guest as being "faster", but it's within margin of error, could also be due to slight version diff):

Hypervisor (OS native): https://browser.geekbench.com/v5/cpu/7640849

Guest VM: https://browser.geekbench.com/v5/cpu/14968889
 

ND40oz

[H]F Junkie
Joined
Jul 31, 2005
Messages
12,716
Enable Hyper-V and compare that to VMware workstation. It's a Type 1 hypervisor that has direct access to the underlying hardware.
 

cdabc123

2[H]4U
Joined
Jun 21, 2016
Messages
3,990
I use esxi on my desktop for gaming and workstation stuff (with GPU passthrough). There is no noticeable performance drop (in reality maybe a few percentage)

As mentioned kvm, hyper v or any type 1 hyperviser will be a better solution.
 

Nobu

[H]F Junkie
Joined
Jun 7, 2007
Messages
8,541
It's pretty dam close already with cpu virtualization extensions enabled, except maybe a few edge-cases.

Edit: I should note, that intel likes to disable their extensions on certain skus, sometimes randomly it seems. Gotta check to make sure you're getting one which has support enabled.
 

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,535
I could be wrong, but I think that even some game console like the XBox one used type 1 VM (I imagine for sandboxing or even help performance wise the game session not being bothered by the larger OS with Apps running one), that how little performance issue some had for a decade.
 

toast0

[H]ard|Gawd
Joined
Jan 26, 2010
Messages
1,894
If you're passing through the relevant hardware, and you're using all the virtualization acceleration, it should be pretty close performance wise. Where you might really lose is if you need to keep as strong isolation as possible, but you don't have dedicated cores per VM; then you're doing a lot of extra cache flushing whenever you switch VMs on a core, but if you're overprovisioning your cores like that, it's hard to directly compare with dedicated hardware.

If storage goes through the host rather than pass through, sometimes you'll get a benefit from host level caching, especially if the guest is really bad at disk caching, or if you have extra ram in your host etc. For network, maybe you'll spring for 10G for your host where you would have only done 1G for a smaller dedicated server, or if your guests talk to each other, you skip physical ethernet and gain some efficiency that way.
 

ng4ever

2[H]4U
Joined
Feb 18, 2016
Messages
2,928
I thought I would like Hyper-V but do not. :(

Will just use a old system instead for testing.
 

MrGuvernment

Fully [H]
Joined
Aug 3, 2004
Messages
20,683
Depends really,
I use Vmware workstation, VMs on a Samsung 980 PRO 2TB, my rig is an AMD 5950x with 96GB of ram and an AMD RX6800. I do not do gaming inside my vms but various other things across windows or linux. I can watch Youtube videos with out delay and in general things are smooth.

I do notice for example that using Mint Linux and Discord, discord can be sluggish to use
 

OFaceSIG

2[H]4U
Joined
Aug 31, 2009
Messages
3,416
Now matter how you slice it there is a layer there between the guest and the hardware. As others have stated virtualization has gotten really damn good. But a layer is a layer. It consumes resources.
 

vxspiritxv

[H]ard|Gawd
Joined
Feb 10, 2001
Messages
1,574
I use ubuntu linux kvm with windows 10 ameliorated. Windows feels faster than default install on bare metal, because it has all the bloat removed. Can play cyberpunk at 50fps on 4k screen (with dlss) on a 11800h/3060 laptop. 6gb video mem is my main issue. I have a new 12900/3080ti laptop on the way.
Bare metal (same laptop, tho not mine):
My laptop in a virtual machine...
I'm only giving it 12 of the 16 threads available to the processor.
3dmark.png
 

Bowman15

[H]ard|Gawd
Joined
Apr 7, 2015
Messages
1,846
I use ubuntu linux kvm with windows 10 ameliorated. Windows feels faster than default install on bare metal, because it has all the bloat removed. Can play cyberpunk at 50fps on 4k screen (with dlss) on a 11800h/3060 laptop. 6gb video mem is my main issue. I have a new 12900/3080ti laptop on the way.
Bare metal (same laptop, tho not mine):
My laptop in a virtual machine...
I'm only giving it 12 of the 16 threads available to the processor.
View attachment 477800


That is right up my ally. Just learned about KVM a while go. Had Windows 7 in Virtualbox becsuse hyper-v is shit and still couldn't get any games to run. Hech I have Linx Mint in Virtualbox that can run more games than Windows as a vm. Problem is kvm inside virtualbox is a no go for obvious reasons. Going to have to find some spare equipment to install Linux on and try kvm out.
 

vxspiritxv

[H]ard|Gawd
Joined
Feb 10, 2001
Messages
1,574
Mini update to my post, got my new laptop. As it is now, disappointment.
Could be Intel 12th gen newness but, well scores speak for themselves.
Lower score in cinebench:
1654450417906.png

Slightly higher scores in 3dmark:
1654450543644.png

Alien head power button not dimmable.
Performance mode button (Fn+F1) doesn't work in linux.
OMFG windows 11, It sucks so much. Bitlocker on by default, extra steps to get dual boot going ugh lol.
At idle, it's slightly louder, I can live with this as its noticeably cooler on the fingers (vs m15r6) and doesn't seem to ramp up randomly watching youtube.
At load, it's quieter, at least in linux. In windows, it got just as loud I want to say. So there might be something to it here as it reflects to performance.
Pinned VM to first 12 cores (assumed to be performance cores) didn't attempt anything else per reddit post of crashes if you don't.
Had to run DCH nvidia driver, 3080 Ti released after the standard driver stopped getting updates. Might be able to hack it, but I don't see it worth my time. I'll just live without the control panel.

Main reason I "upgraded" was for vram issue (6gb is not enough), and sure enough, that is fixed, but for the price of this I was really hoping for more. Hopefully newer kernels will improve CPU performance.
Also, get about 15 to 25fps more in Cyberpunk at same settings.

apt install qemu qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager

/etc/systemd/logind.conf
HandleLidSwitch=lock – lock when lid closed.

dmesg | grep 10de
[ 0.511949] pci 0000:01:00.0: [10de:2460] type 00 class 0x030000
[ 0.512207] pci 0000:01:00.1: [10de:2288] type 00 class 0x040300

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.allow_tpm=1 intel_iommu=on kvm.ignore_msrs=1 vfio-pci.ids=10de:2460,10de:228e"
update-grub

use virt manager to make your VM, add both nvidia devices to the VM.

12th gen CPUs (pinning): /etc/libvirt/qemu/?????????.xml
replace: <vcpu placement='static'>12</vcpu>
with: <vcpu placement='static' cpuset='0,1,2,3,4,5,6,7,8,9,10,11'>12</vcpu>
 

Vengance_01

Supreme [H]ardness
Joined
Dec 23, 2001
Messages
6,725
Seems your CPU and GPU could be lower powered versions.... Hence the lower CPU score and I would expect a much larger gain going to a 3080ti mobile from the 3060
 
Top