Home > Mac OS X, VMware > Improving Yosemite VM performance in VMware Fusion

Improving Yosemite VM performance in VMware Fusion

Being able to virtualize OS X with VMware Fusion has been a great tool for Mac admins, as it allows them to test out new workflows and configurations before committing them to actual Macs. To go along with the convenience, there can be a performance trade-off between VMs and physical Macs, but it’s usually been one where assigning adequate RAM and processors to the VMware Fusion VM usually resulted in decent performance in the VM.

This changed with Yosemite, where the graphics performance in a VM was sluggish and assigning more RAM and processors to a VM did not address the issue. Even ensuring that the VMware Tools were installed did not markedly improve performance. I also saw redraw issue involving windows that had been in the background and hidden behind other windows. These windows were not redrawing correctly when they were selected and brought to the foreground, resulting in parts of windows showing up as being transparent.

On investigation, the root cause of the issue was beam synchronization, which is a technique first introduced in 10.4.x to better handle screen redraw and allow OS X’s window management process to be more efficient. Beam synchronization works fine on Yosemite when running on actual machines, but it is apparently a significant issue when running in a VMware VM.

Fortunately, the answer to the problem is relatively simple – disable beam synchronization. Once that’s done, the performance of an OS X VM running 10.10.x improves dramatically. However, there were two hitches:

  1. The way to disable it was to use Apple’s Quartz Debug developer tool.
  2. You had to disable it on every login.

QuartzDebug_beam_sync_off_Yosemite

Enter BeamOff, an application designed to do one thing – disable beam synchronization. For more details, see below the jump.

BeamOff was written by JasF, who developed BeamOff to fix the performance issue he was having with Yosemite VMs. JasF posted the source files to GitHub and a compiled version of the application as part of this thread on the InsanelyMac forums.

When BeamOff runs, you should see it appear briefly in the dock and bounce once or twice as it runs. Once it has finished disabling beam sync, it then quits automatically.

When I tested the compiled BeamOff application, I saw a considerable improvement in how fast the VM was now responding. The window redraw issues I had previously seen were also addressed, with windows now being refreshed correctly regardless if they were in the background or foreground.

Because I wanted to have BeamOff run automatically, I installed it in the /Applications directory of my Yosemite VM and wrote the following LaunchAgent to launch and run BeamOff on login:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.company.launch_beamoff</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/beamoff.app/Contents/MacOS/beamoff</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

To assist other Mac admins who are also dealing with this issue, I’ve also built and posted an installer for BeamOff and the LaunchAgent, which is available as a .zip file from the installer directory. The installer adds BeamOff to /Applications and installs the LaunchAgent to /Library/LaunchAgents.

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/fix_yosemite_vm_graphic_performance

For those interested in building their own installer, I’ve also posted a copy of the compiled BeamOff application, the LaunchAgent and the Packages project files I used to build the BeamOff installer. Those are available in the resources directory up on my repo:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/fix_yosemite_vm_graphic_performance/resources

Categories: Mac OS X, VMware
  1. December 14, 2014 at 1:06 pm

    I was beating my head against this very issue this week. Thanks for the post, Rich!

  2. December 17, 2014 at 3:44 pm

    Lovely. I definitely see improved performance but for some reason, still, when I open a .icns file in Preview it doesn’t load all of the layers. Which is a bit mind-boggling. But the VM is much more responsive, which is helpful. Thanks!

  3. Régis Duchesne
    December 18, 2014 at 2:34 pm

    Rich, thanks for raising your voice to let us know that this workaround works. We have implemented this workaround in the VMware Tools, that we will ship as part of an upcoming VMware Fusion release.

    • jpap
      May 12, 2015 at 3:35 pm

      Régis, as of mid-May 2015, I still have to implement this workaround myself in VMWare Fusion 7 (VMWare Tools are installed). Can you confirm when it will be included?

  4. Mr Widget
    December 30, 2014 at 11:18 pm

    Rich, thanks for this. However the file posted on git (“fix_yosemite_vm_graphic_performance.zip”) doesnt seem to decompress properly, resulting in a “fix_yosemite_vm_graphic_performance.zip.cpgz” file.

  5. January 25, 2015 at 1:57 am

    Or just dump Fusion for Parallels – which I did after 5 years with Fusion. No issues whatsoever. This is not a Yosemite-only problem. Vmware is twiddling their thumbs. Parallels is fine.

    • March 19, 2015 at 10:43 pm

      Seth is probably the best looking computer nerd on this forum 🙂

  6. June 26, 2015 at 5:55 pm

    Great my VM’s working perfectly now..Thankyou for the post 😀

  7. July 13, 2015 at 6:32 pm

    I’m leaving this note here for myself, don’t mind me…


    #!/usr/bin/python
    import ctypes, ctypes.util
    # Import CoreGraphics as a C library, so we can call some private functions
    c_CoreGraphics = ctypes.CDLL(ctypes.util.find_library('CoreGraphics'))
    def disable_beam_sync(doDisable):
    if doDisable:
    # Disabling beam sync:
    # 1st: Enable Quartz debug
    err = c_CoreGraphics.CGSSetDebugOptions(ctypes.c_uint64(0x08000000))
    # 2nd: Set beam sync to disabled mode
    err = c_CoreGraphics.CGSDeferredUpdates(0)
    else:
    # Enabling beam sync:
    # 1st: Disable Quartz debug
    err = c_CoreGraphics.CGSSetDebugOptions(0)
    # 2nd: Set beam sync to automatic mode (the default)
    err = c_CoreGraphics.CGSDeferredUpdates(1)
    # Disable beam sync
    disable_beam_sync(True)

    view raw

    beamsync.py

    hosted with ❤ by GitHub

    pudquick / beamsync.py

  8. August 7, 2015 at 9:54 pm

    Thanks for the great article: I’ve translated it in italian in my IT blog here: http://www.ryadel.com/os-x-yosemite-e-vmware-prestazioni-scadenti-come-risolvere/

  9. AxeL
    September 28, 2015 at 9:37 am

    Thnx Rich,
    I’m running a Yosemite VM with the latest VMware Fusion 7.1.2.
    I’ve noticed that after launching beamoff the UI randomly hangs (though the system is still reachable via SSH).
    Did you experience something like this?

  10. October 1, 2015 at 6:48 pm

    Awesome! Thanks for putting this all together you rock!!!

  11. Joe
    November 30, 2015 at 11:02 pm

    Beamoff.app did the trick. Thanks so much.

  12. January 4, 2016 at 11:17 am

    Awesome !!! worked like a charm

  13. Bojan
    September 21, 2016 at 7:36 pm

    Any experience in combination with macOS Sierra? Does it work the same way?

    Thanks

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: