VirtualBox

Ticket #18678 (new defect)

Opened 16 months ago

Last modified 16 months ago

macOS app nap: effecting performance of VirtualBox VM

Reported by: PikeSandwich Owned by:
Component: host support Version: VirtualBox 6.0.8
Keywords: Cc:
Guest type: Linux Host type: Mac OS X

Description

host macOS 10.14.5 (Mojave) iMac 19,1 (Intel i5, 6 core, 40GB RAM), guests linux (ubuntu 19.04, Windows10 1809) the VirtualBox VM process will get AppNap'd by macOS resulting in:

  1. approximately 20-25% performance compared to when AppNap=no for cpu-bound guest process
  2. while degraded, host still reports full CPU core consumption. to be clear, if running 1 cpu-bound guest process, when AppNap=no host reports 100% CPU utilitizatiion (expected), when AppNap=yes host still reports 100% CPU utilization (not expected).
  3. this does NOT happen when VM is run headless (presumably because AppNap targets .app with GUI contexts)

Steps taken to produce problem:

  1. rm VBox.log
  2. launch linux guest with head
  3. ssh into linux guest
  4. launch spin.rb script to loop/bump counter, and every 1.0 second emit count/reset-count, output is @4,400,000/s
  5. minimize (yellow button on macOS host) guest head
  6. watch Activity Monitor.app CPU tab with added field App Nap and filter on virtualbox, and notice VirtualBox VM nap=no
  7. watch Intel Power Gadget.app Frequency monitor, core pegged at turbo rate of 4.0GHz
  8. wait for something around 30-60 seconds passes
  9. notice (3) changed output from @4,400,000/s → @1,200,000/s
  10. notice (5) changed nap from noyes
  11. notice (6) changed from 4.0GHz → 2.0GHz and stabilized at 1.5GHz
  12. wait an arbitrary 45 seconds or so
  13. un-minimize previously minimized guest head (from step (4))
  14. notice (3),(5),(6) change back to output @4,400,000/s, nap=no, core=4.0GHz
  15. shutdown linux guest
  16. save VBox.log

related forum thread:  https://forums.virtualbox.org/viewtopic.php?f=8&t=93183

Attachments

VBox.log.gz Download (34.7 KB) - added by PikeSandwich 16 months ago.
spin.rb.gz Download (176 bytes) - added by PikeSandwich 16 months ago.
ruby script to spin cpu report iterations per second
spin.log.gz Download (1.2 KB) - added by PikeSandwich 16 months ago.
log showing drop in spin.rb running in linux ubuntu 19.04 guest
activity.png Download (142.9 KB) - added by PikeSandwich 16 months ago.
activity monitor filtered to virtualbox, and sorted by appnap column
frequency.png Download (95.6 KB) - added by PikeSandwich 16 months ago.
Intel Power Gadget core frequency monitor drop coninciding with appnap=yes

Change History

Changed 16 months ago by PikeSandwich

Changed 16 months ago by PikeSandwich

ruby script to spin cpu report iterations per second

Changed 16 months ago by PikeSandwich

log showing drop in spin.rb running in linux ubuntu 19.04 guest

Changed 16 months ago by PikeSandwich

activity monitor filtered to virtualbox, and sorted by appnap column

Changed 16 months ago by PikeSandwich

Intel Power Gadget core frequency monitor drop coninciding with appnap=yes

comment:1 Changed 16 months ago by socratis

Related discussion in the forums:  https://forums.virtualbox.org/viewtopic.php?f=8&t=93183

It's worth mentioning that this issue was discovered independently from a user in the Apple forums:  https://discussions.apple.com/thread/250276999

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use