Search code examples
virtualbox

VirtualBox idle Windows guest high CPU usage on host


VirtualBox windows 8.1 image is created on i7 system and performing perfectly (linux and windows host). When image is moved on Xeon system ~300% linux host CPU is used with the idle guest.

VBoxManage showvminfo vm
Name:                        vm
Groups:                      /
Guest OS:                    Windows 8.1 (64-bit)
UUID:                        fdb2debf-31ff-4867-8c53-a315d12d348b
Config file:                 /root/VirtualBox VMs/vm/vm.vbox
Snapshot folder:             /root/VirtualBox VMs/vm/Snapshots
Log folder:                  /root/VirtualBox VMs/vm/Logs
Hardware UUID:               fdb2debf-31ff-4867-8c53-a315d12d348b
Memory size                  8000MB
Page Fusion:                 disabled
VRAM size:                   128MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              32
PAE:                         enabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      disabled
Nested VT-x/AMD-V:           disabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              disabled
Boot Device 1:               HardDisk
Boot Device 2:               Not Assigned
Boot Device 3:               Not Assigned
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         local time
Hardw. virt.ext:             enabled
Nested Paging:               enabled
Large Pages:                 enabled
VT-x VPID:                   enabled
VT-x unr. exec.:             enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   HyperV
State:                       running (since 2019-05-03T04:26:59.439000000)
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:          
Teleporter Password:         
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:       
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:            
Storage Controller Name (0):            cont
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      30
Storage Controller Bootable (0):        on
cont (0, 0): /root/VirtualBox VMs/vm/Snapshots/{eec50ba7-9d02-4c51-9676-4ed0a761c6ce}.vdi (UUID: eec50ba7-9d02-4c51-9676-4ed0a761c6ce)
NIC 1:                       MAC: 080027F44A7A, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82545EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0):   name = http, protocol = tcp, host ip = , host port = 8000, guest ip = , guest port = 80
NIC 1 Rule(1):   name = rdp, protocol = tcp, host ip = , host port = 3389, guest ip = , guest port = 3389
NIC 2:                       disabled
NIC 3:                       disabled
NIC 4:                       disabled
NIC 5:                       disabled
NIC 6:                       disabled
NIC 7:                       disabled
NIC 8:                       disabled
Pointing Device:             PS/2 Mouse
Keyboard Device:             PS/2 Keyboard
UART 1:                      disabled
UART 2:                      disabled
UART 3:                      disabled
UART 4:                      disabled
LPT 1:                       disabled
LPT 2:                       disabled
Audio:                       disabled
Audio playback:              disabled
Audio capture:               disabled
Clipboard Mode:              disabled
Drag and drop Mode:          disabled
Session name:                headless
Video mode:                  2217x1272x32 at 0,0 enabled
VRDE:                        enabled (Address 0.0.0.0, Ports 6666, MultiConn: off, ReuseSingleConn: on, Authentication type: external)
VRDE port:                   6666
Video redirection:           disabled
VRDE property               : TCP/Ports  = "6666"
VRDE property               : TCP/Address = <not set>
VRDE property               : VideoChannel/Enabled = <not set>
VRDE property               : VideoChannel/Quality = <not set>
VRDE property               : VideoChannel/DownscaleProtection = <not set>
VRDE property               : Client/DisableDisplay = <not set>
VRDE property               : Client/DisableInput = <not set>
VRDE property               : Client/DisableAudio = <not set>
VRDE property               : Client/DisableUSB = <not set>
VRDE property               : Client/DisableClipboard = <not set>
VRDE property               : Client/DisableUpstreamAudio = <not set>
VRDE property               : Client/DisableRDPDR = <not set>
VRDE property               : H3DRedirect/Enabled = <not set>
VRDE property               : Security/Method = <not set>
VRDE property               : Security/ServerCertificate = <not set>
VRDE property               : Security/ServerPrivateKey = <not set>
VRDE property               : Security/CACertificate = <not set>
VRDE property               : Audio/RateCorrectionMode = <not set>
VRDE property               : Audio/LogPath = <not set>
OHCI USB:                    disabled
EHCI USB:                    disabled
xHCI USB:                    disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:<none>

VRDE Connection:             active
Clients so far:              3
Start time:                  2019/05/03 04:27:05 UTC
Sent:                        24421625Bytes
Average speed:               26504B/s
Sent total:                  24421625Bytes
Received:                    270108Bytes
Speed:                       293B/s
Received total:              270108Bytes
User name:                   admin
Domain:                      
Client name:                 dev
Client IP:                   192.168.0.59
Client version:              2600
Encryption:                  RDP4

Capturing:                   not active
Capture audio:               not active
Capture screens:             
Capture file:                /root/VirtualBox VMs/vm/vm.webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:             

Guest:

Configured memory balloon size: 0MB
OS type:                     Windows81_64
Additions run level:         3
Additions version            6.0.6 r130049

Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2019/05/03 04:27:11 UTC)
Facility "VirtualBox System Service": active/running (last update: 2019/05/03 04:27:24 UTC)
Facility "VirtualBox Desktop Integration": active/running (last update: 2019/05/03 04:27:53 UTC)
Facility "Seamless Mode": active/running (last update: 2019/05/03 04:27:11 UTC)
Facility "Graphics Mode": active/running (last update: 2019/05/03 04:27:11 UTC)

Solution

  • Solution is counter-intuitive, limit guest OS run on one (1) core. It brings extremely fast OS boot times and in my case best processing performance. All this has something to do with CPU context switching and optimizations at OS or hardware levels.

    Didn't figured out what exactly makes VBox perform this way but my guess is that something related to CPU and not limited to i7 / Xeon differences.

    Found this usefull: https://www.reddit.com/r/linux/comments/1tqlsz/adding_cpus_to_virtualbox_guests_makes_guests/