Intel 12th gen Alder Lake CPU comes with new big.LITTLE architecture with performance P-cores and efficient E-cores. And Windows 11 Thread Director now decides on which of these cpus should process/thread be scheduled. Foreground processes are schedulled on P-cores, background processes and minimized windows on E-cores. And this causes problems with VirtualBox performance.
When I start machine normally, VM performance is good. But when VM window is minimized, windows no longer schedules VM on P-cores, but on E-cores. The same happens when you start VM headless, it is background task for windows and schedules it on E-cores.
Performance on E-cores is very bad, much times slower than on P-cores. Test machines with RAC were unusable in my case.
You can check to which cores is VM scheduled in windows task manager, show logical cpus insted of summary and run some cpu intensive task in VM for test, like:
openssl speed -evp aes-128-xts
First listed cores are P-cores, last are E-cores.
Searching similar problems I found that this is generic problem with Windows 11 on Alder Lake CPU, this is how it was designed.
It seems that there could be few workarounds:
- run VirtualBox with Admin rights - I have not tested it, I do now want to run VBox with higher privileges
- set Windows 11 power mode to "Best Performance" from "Balanced" - but that would affect all applications and laptop power consumption
- disable E-cores in bios, if such setting is available - also not adviced
- disable power throttling just for Virtualbox processes
I choosed last workaround, disabled power throttling.
From Terminal (Admin) shell (opened with Win+X):
powercfg /powerthrottling disable /path "C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe"
powercfg /powerthrottling disable /path "C:\Program Files\Oracle\VirtualBox\VirtualBoxVM.exe"
powercfg /powerthrottling list
Battery Usage Settings By App
=============================
Application: C:\Program Files\Oracle\VirtualBox\VirtualBoxVM.exe
Never On
Application: C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe
Never On
This worked for me both for minimized window when started VM normally as well as for headless start. Now are VMs again as fast or fasteer as on previous laptop.
As this could affect all users on Alder Lake and newer CPUs, it would be good to fix it. Maybe set some QoS parameters for virtualbox processes?
VirtualBox slow on Alder Lake CPU and Win 11
-
fth0
- Volunteer
- Posts: 5690
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: VirtualBox slow on Alder Lake CPU and Win 11
Kudos for the detailed analysis! 
There's one additional workaround: You could use start /affinity 0x00ff VirtualBoxVM --startvm "VM name" (with an appropriate affinity bit mask) to force a VM onto the P-cores. But I wouldn't limit it to a subset of the P-cores, because you might be fighting against the algorithms of the Intel Thread Director and the Windows scheduler then.kabu wrote:It seems that there could be few workarounds: [...]
I'd suggest to create a enhancement request ticket in the Bugtracker for that.kabu wrote:As this could affect all users on Alder Lake and newer CPUs, it would be good to fix it. Maybe set some QoS parameters for virtualbox processes?
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: VirtualBox slow on Alder Lake CPU and Win 11
Thank you, kabu, for this info! I also have been wondering how Virtualbox would perform on the newer P/E processors, as a hardware upgrade at home may occur in the not-too-distant future. Going to bookmark this!
Thanks, also, fth0! Another good idea to try if I get a P/E CPU. Good info for ThomasF on viewtopic.php?f=1&t=108693 too!
Thanks, also, fth0! Another good idea to try if I get a P/E CPU. Good info for ThomasF on viewtopic.php?f=1&t=108693 too!
Re: VirtualBox slow on Alder Lake CPU and Win 11
After a while I need to use my test machines. I started them, but performance was terrible.
I was thinking what was changed recently. Windows 11 upgraded to 24H2 week ago? Opened task manager and noticed, that my headless machines are using E-cores.
I then remembered this my old post, when I found fix with powerthrottling.
So checked powercfg /powerthrottling list - and it was empty. Configured it again and performance was back.
So once you upgrade Windows 11 to 24H2, you need to check powercfg config and if needed disable again powerthrottling for virtualbox background processes! It is lost with upgrade!
I was thinking what was changed recently. Windows 11 upgraded to 24H2 week ago? Opened task manager and noticed, that my headless machines are using E-cores.
I then remembered this my old post, when I found fix with powerthrottling.
So checked powercfg /powerthrottling list - and it was empty. Configured it again and performance was back.
So once you upgrade Windows 11 to 24H2, you need to check powercfg config and if needed disable again powerthrottling for virtualbox background processes! It is lost with upgrade!
Re: VirtualBox slow on Alder Lake CPU and Win 11
Thanks. I solve my problem after read this post
I use Oracle RAC 2 nodes
I use Oracle RAC 2 nodes
Re: VirtualBox slow on Alder Lake CPU and Win 11
I had the same problem with VirtualBox/Windows 11 on this type of processor. I solved it by modifying the affinity of the process associated with VirtualBox.
To do this, I don't use the interface to launch my virtual machine, but a bash script (Cygwin). First, you need to launch the storage controller associated with the virtual machine, then set the affinity. See "change-affinity-of-process-with-windows-script" on stackoverflow.
To do this, I don't use the interface to launch my virtual machine, but a bash script (Cygwin). First, you need to launch the storage controller associated with the virtual machine, then set the affinity. See "change-affinity-of-process-with-windows-script" on stackoverflow.