VirtualBox

Opened 5 years ago

Closed 7 months ago

#18678 closed defect (fixed)

macOS app nap: effecting performance of VirtualBox VM => fixed in SVN

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 (5)

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

Download all attachments as: .zip

Change History (9)

by PikeSandwich, 5 years ago

Attachment: VBox.log.gz added

by PikeSandwich, 5 years ago

Attachment: spin.rb.gz added

ruby script to spin cpu report iterations per second

by PikeSandwich, 5 years ago

Attachment: spin.log.gz added

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

by PikeSandwich, 5 years ago

Attachment: activity.png added

activity monitor filtered to virtualbox, and sorted by appnap column

by PikeSandwich, 5 years ago

Attachment: frequency.png added

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

comment:1 by Socratis, 5 years ago

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

comment:2 by Klaus Espenlaub, 8 months ago

Summary: macOS app nap: effecting performance of VirtualBox VMmacOS app nap: effecting performance of VirtualBox VM => fixed in SVN

This should be resolved with the 7.0.x test builds with revision 162483 or later.

comment:3 by galitsyn, 7 months ago

Hi guys,

We just released VirtualBox 7.0.18. This issue should be fixed in this release. It can be downloaded from here. Thank you for reporting the issue.

comment:4 by galitsyn, 7 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette