Opened 5 years ago
Last modified 5 years ago
#18678 new defect
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:
- approximately 20-25% performance compared to when AppNap=no for cpu-bound guest process
- 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).
- this does NOT happen when VM is run headless (presumably because AppNap targets .app with GUI contexts)
Steps taken to produce problem:
- rm
VBox.log - launch linux guest with head
- ssh into linux guest
- launch
spin.rbscript to loop/bump counter, and every 1.0 second emit count/reset-count, output is @4,400,000/s - minimize (yellow button on macOS host) guest head
- watch
Activity Monitor.appCPU tab with added fieldApp Napand filter onvirtualbox, and noticeVirtualBox VMnap=no - watch
Intel Power Gadget.appFrequency monitor, core pegged at turbo rate of 4.0GHz - wait for something around 30-60 seconds passes
- notice (3) changed output from @4,400,000/s → @1,200,000/s
- notice (5) changed nap from
no→yes - notice (6) changed from 4.0GHz → 2.0GHz and stabilized at 1.5GHz
- wait an arbitrary 45 seconds or so
- un-minimize previously minimized guest head (from step (4))
- notice (3),(5),(6) change back to output @4,400,000/s, nap=
no, core=4.0GHz - shutdown linux guest
- save
VBox.log
related forum thread: https://forums.virtualbox.org/viewtopic.php?f=8&t=93183
Attachments (5)
Change History (6)
by , 5 years ago
| Attachment: | VBox.log.gz added |
|---|
by , 5 years ago
| Attachment: | spin.rb.gz added |
|---|
by , 5 years ago
| Attachment: | spin.log.gz added |
|---|
log showing drop in spin.rb running in linux ubuntu 19.04 guest
by , 5 years ago
| Attachment: | activity.png added |
|---|
activity monitor filtered to virtualbox, and sorted by appnap column
by , 5 years ago
| Attachment: | frequency.png added |
|---|
Intel Power Gadget core frequency monitor drop coninciding with appnap=yes
comment:1 by , 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


ruby script to spin cpu report iterations per second