Page 1 of 1

low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 9. Sep 2020, 15:53
by Benman2785
hi,

my Host is a KVM "root" running Ubuntu 18.04.5 LTS with 4.15.0-117-lowlatency x86_64
specs: Xeon E5-2660V3 (2 cores dedicated) + 3GB DDR4 + 4x 120GB SAS-HDD (RAID-10)

i run VirtualBox 5.2.0 (6.1 resulted in VT-X error starting any VM)

the guest is a 32bit WinXP with 768MB RAM + 1 Core (set core affinity to stick to one core, also gave niceness of -19 or -20); SAS-Controller, NAT-Network (only 2 needed ports forwarded)

when i ONLY START the guest and the guest is completely idle i get 1-2% load in guest but 15-20% load on host!
if i start my server-programm that NEEDS WinXP (Freelancer Server) i get 5-15% load in guest BUT 35-45% load on host!

Is there anyway to lower the load on Host?

VBoxManage showvminfo --details

Code: Select all

Name:            FLServer
Groups:          /
Guest OS:        Windows XP (32-bit)
UUID:            f40c1635-4533-4a1c-97fb-cb6d096e5964
Config file:     /home/flserver/VirtualBox VMs/FLServer/FLServer.vbox
Snapshot folder: /home/flserver/VirtualBox VMs/FLServer/Snapshots
Log folder:      /home/flserver/VirtualBox VMs/FLServer/Logs
Hardware UUID:   f40c1635-4533-4a1c-97fb-cb6d096e5964
Memory size:     768MB
Page Fusion:     off
VRAM size:       32MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             off
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): HardDisk
Boot Device (2): Not Assigned
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             UTC
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: KVM
Effective Paravirt. Provider: KVM
State:           running (since 2020-09-08T11:59:43.077000000)
Graphics Controller:         VBoxVGA
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0):            SAS
Storage Controller Type (0):            LsiLogicSas
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  255
Storage Controller Port Count (0):      8
Storage Controller Bootable (0):        on
SAS (0, 0): /var/www/VirBox/VMs/FLServer.vhd (UUID: 2f142f89-70b7-4e32-8fe9-43e30f4ee5fb)
NIC 1:           MAC: 080027891151, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82543GC, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0):   name = Rule 1, protocol = udp, host ip = , host port = 2302, guest ip = , guest port = 2302
NIC 1 Rule(1):   name = Rule 2, 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:      640x480x32 at 0,0 enabled
VRDE:            disabled
USB:             disabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices: <none>

Currently Attached USB Devices: <none>

Bandwidth groups: <none>
Shared folders: <none>

VRDE Connection:    not active
Clients so far:     0

Capturing:          not active
Capture audio:      not active
Capture screens:    0
Capture file:       /home/flserver/VirtualBox VMs/FLServer/FLServer.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25
Capture options:

Guest:
Configured memory balloon size:      0 MB
OS type:                             WindowsXP
Additions run level:                 2
Additions version:                   6.1.14 r140239

Guest Facilities:
Facility "VirtualBox Base Driver": active/running (last update: 2020/09/08 12:00:22 UTC)
Facility "VirtualBox System Service": active/running (last update: 2020/09/08 12:00:32 UTC)
Facility "VirtualBox Desktop Integration": failed (last update: 2020/09/08 12:00:51 UTC)
Facility "Seamless Mode": not active (last update: 2020/09/08 12:00:22 UTC)
Facility "Graphics Mode": not active (last update: 2020/09/08 12:00:22 UTC)

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 9. Sep 2020, 15:57
by Benman2785
EDIT:

sry for bad picture quality - highres pic tomorrow ;)

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 9. Sep 2020, 16:43
by Benman2785
here is what i did after posting the logs:

i installed the 5.2.44 GA and 5.2.44 Ext-Pack // i also enabled nested-pageing
rebooted host

still hovers around 35-45% load on Host while Guest uses 5-15%

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 9. Sep 2020, 17:47
by scottgus1
Not that I have any idea how to fix this, but does a regular Ubuntu host run your guest OS OK? Can you switch drives in your host PC, install regular Ubuntu and try the same guest?

Also can you try removing the core affinity and "niceness" settings?

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 9. Sep 2020, 18:23
by Benman2785
thanks for your answer

its a root-server hosted by netcup - so i cant copy the same hw for testing it on my machine ;)
yet i will setup a ubuntu on my desktop and check if it runs fine. What i know is that it runs fine on my AMD Ryzen 7 2700X on Windows 10 with VB 6.1.4 - there it behaves "normal" as it should

i also cant change the drive as my server runs in RAID-10 - so i only have one harddrive. But i will talk to my host to maybe allow 1x Raid 1 of 120GB (for OS) and 1x Raid 0 (2x120GB) (mounted in /var/www) - yet i dont know if they agree on that. (its a 5€/month KVM with Fair-Use-Flat, 2 dedicated Cores, 3GB RAM, 240GB space (4x 120GB in RAID-10) - so its a pretty good offer for my simple usecase)
It is possible that this limits the VM and creates high disk i/o load which keeps my CPU occupied - but i am not sure if i can fix that :/
i maybe have the option to buy extra Storage on a different machine which i can than mount into my server - but i guess that will limit bandwidth and create a bigger latency.

i already tried to run with normal affinity (1+2) and also with normal niceness (0 = PRI 20) - also all possible combinations of that. does NOT fix or create the problem.

i also cant swap drivers of my host - as ubuntu uses the correct drivers already.

have a great week scottgus1 ;)

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 9. Sep 2020, 20:09
by fth0
Some ideas:

The VBox.log file indicates the guest OS as Windows XP (64-bit), whereas the VBoxManage showvminfo --details result indicates the guest OS as Windows XP (32-bit). The configured guest OS influences parts of the virtual hardware, so it should match the guest OS. In the case of Windows XP, this maybe cannot be easily changed after installation, but I'm no expert on virtualizing Windows XP.

The Paravirtualization Provider has to match the guest OS, not the host OS. Use the Default or Hyper-V setting.

Always use VirtualBox, the Extension Pack and the Guest Additions with matching versions.

Eliminate all virtual hardware that you do not need. I think you already did try this. ;)

Which host OS threads show the CPU load? Maybe also look at top (key 'H') or configure htop to show the thread names.

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 10. Sep 2020, 12:53
by Benman2785
hey,

changed OS Type back to WinXP 32

ParaVirt isnt implemented in WinXP - so no Hyper-V support for WinXP (but i will check if i can install it manually)

VirtualBox, ExtPack and GA are matching

The Thread with high load is "EMT"

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 10. Sep 2020, 12:57
by Benman2785
https://www.virtualbox.org/ticket/12851

should still be relevant in VB 6

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 11. Sep 2020, 17:50
by scottgus1
You may wish to add the requested diagnostic info to the ticket.

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 12. Sep 2020, 11:33
by fth0
Benman2785 wrote:ParaVirt isnt implemented in WinXP - so no Hyper-V support for WinXP (but i will check if i can install it manually)
Then use "Default" or "None".

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 12. Sep 2020, 14:49
by mpack
VirtualBox VM 5.2.44 r139111 linux.amd64 (Jul 9 2020 18:55:15) release log
...
00:00:40.033597 VMMDev: Guest Additions information report: Version 6.1.14 r140239 '6.1.14'
Completely unacceptable.

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 12. Sep 2020, 22:54
by Benman2785
@mpack

as i said i fixed that ;)

now i run:
VirtualBox 5.2.44
VirtualBox Extension Pack 5.2.44
GuestAdditions 5.2.44

yet the error remains: i get 5-15% load on Host while Guest hovers around 3-15% when complete idle (nothing running - just windows) BUT i get 35-45% load on Host when starting FLSO.exe + FLServer.exe while the Guest is still between 5-20% load (average is ~6% load in Guest)

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 13. Sep 2020, 12:07
by fth0
VBox.log file wrote:
00:00:01.124697 HM: HMR3Init: Falling back to raw-mode: VT-x is not available
[...]
00:00:02.376115 Features
00:00:02.376115   Mnemonic - Description                                  = guest (host)
00:00:02.376180   HVP - Hypervisor Present (we're a guest)                = 0 (1)
Since VirtualBox is running inside KVM (nested virtualization), it has no access to VT-x and falls back to raw mode. In this case, I'd expect the high CPU load on the host that you're experiencing.

Regarding the bug ticket that you mentioned (and added your information to), the other users didn't use raw mode, so your observation is probably not comparable with theirs.

FWIW, raw mode has been removed from VirtualBox 6.1.x, because it has been rarely used in the last decade.

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 13. Sep 2020, 22:25
by Benman2785
@fth0

thank you for your answer ;)

now i know i have to live with it.
is there still a way to lower cpu load in raw mode?

Re: low-latency Kernel Ubuntu Host + WinXP guest = high load on host when guest kind of idleing

Posted: 13. Sep 2020, 22:53
by fth0
Benman2785 wrote:is there still a way to lower cpu load in raw mode?
Lower the CPU load inside the guest OS, by eliminating processes that you don't need.