I am loving the switch from Desktop Server to Local, but occasionally I notice Local seems to be using a huge amount of energy/battery on my Mac. It is literally draining my battery, so much more than is normal on my Mac. Please see this uploaded screenshot from my Activity Monitor and you can see how much energy Local is using, compared to its average usage (which was 30, before the current energy usage drove the average up to 155). Do you have any idea what could be the cause? I would really appreciate help troubleshooting this, thanks!
I had 3 sites running and if I turn off any one of the 3 sites, the energy impact goes from around 150 to 10! Any idea why going from running 2 sites to 3 sites would jump the energy impact from 10 to 150?
While I too have wondered about Local’s energy usage, what you’re seeing does seem a bit extreme. As if the server was really really busy doing… whatever it is it apparently likes doing.
Maybe its swapping RAM like crazy – in that case assigning more memory to the Local process in VirtualBox might help?
For comparison, here’s my Local Energy usage with 6 moderate-to-complex sites running
.Yes, I do see now that “VBoxHeadless” is the process using all the energy (see attached screenshot).
Ugh! I continue to have this issue on my macbook pro. I can only ever run 2 sites at a time or my energy usage jumps up to ~150, resulting in serious drain on my battery and serious heating up / fan noise. Is there anyone that can help me figure out this issue? I’m happy to provide logs or whatever is needed to troubleshoot, I’m just not hardcore enough to troubleshoot myself.
Registered to respond… I have/had the same issue. On a previous thread it was suggested that git repository in the wp-content directory could cause this, but this was not my case.
In my case, at least one culprit was the plugin UpdraftPlus, that was running backups periodically. When I terminated the backup, the CPU usage for VboxHeadless dropped back down to ~2-10% CPU usage.
I’d check to see if any plugins may be running the background on your WordPress installation.
Thanks so much for offering some suggestions! My git repo is in the same directory as wp-content, so that shouldn’t be an issue for me. I may be running UpdraftPlus or similar plugin…I’ll look into that.
This continues to be an issue for me. I don’t see any WordPress plugins that would be affecting this. I just don’t understand while running one site, Local has an energy impact of around “10” and as soon as I run two sites the energy impact is around “100”! It’s very frustrating that I can only run one site at a time. If I run more than one, my computer gets really hot and my batter drains very rapidly. Is there anyone that works for Flywheel that can offer some support? I would greatly appreciate some help figuring out what’s wrong here.
This is definitely interesting. Do you have Faster Docker Volumes enabled under Preferences » Advanced?
Also, can you try the following?
- Stop all sites in Local
- Create 2 new fresh sites in Local
- Check Activity Monitor again
Clay, thanks for checking in on this! I don’t have Faster Docker Volumes enabled. I stopped all sites and created 2 fresh sites and the energy impact was only around “14” with the 2 fresh sites running.
Got it. Thanks for testing that!
Go ahead and try enabling Faster Docker Volumes. That should reduce the CPU usage of the VirtualBox process.
If the local-flywheel-unfsd
process ends up eating the CPU like VirtualBox, we can take a closer look at the site(s) to see what’s heavily using the disk/CPU.
No problem. I enabled Faster Docker Volumes and tried running 2 sites at once. Unfortunately there was no change, it still jumps up to around “100”. Are there are any logs I can pull up to help pinpoint what’s causing this?
If you go to Preferences » Advanced again, is Faster Docker Volumes still enabled? If the Faster Docker Volumes server gets blocked by internet security or fails to start, that option will change.
Have you tried running each of the two sites by itself? By that, I mean have you tried running only site A and then only site B?
Also, have you tried doing what @philby mentioned above?
Faster Docker Volumes is still enabled. Yes, when I run one site at a time the energy impact is only “10”. I have not tried what @philby mentioned—only because I couldn’t figure out how to do it. Do you know how I can assign more memory?
Yup!
- Quit Local if it’s running
- Open VirtualBox
- Wait for
local-by-flywheel
to become “Powered Off” (if it doesn’t power off after 3 minutes or so, right-click on it and go to Close » ACPI Shutdown) - Right-click on
local-by-flywheel
and go to Settings - Go to “System”
- Increase “Base Memory” to 2048MB
- Press “OK”
- Re-open Local
Thanks for the instructions on how to do that! I increased memory to 2048 and unfortunately the behavior stayed the same: that 2nd site still bumps energy impact up to “100” (and stays at “100”). I guess I’ll decrease the memory back to 1024 since it didn’t seem to help.
Do you have any idea what else could cause Local to use so much energy when going from running one site to two? I’m sorry this is a pain to troubleshoot. I wish I had a better understanding of the system and knew what I could look for.
Thanks for giving it a try!
Are you running a file watcher that’s automatically transpiling CSS/JS? If not an automatic transpiler, are you using LiveReload?
Yes I sure am! Running gulp watch task to process postcss and livereload browser with browsersync.
Aha. Try disabling it (temporarily) and see if that helps with the VBoxHeadless
CPU issue.
I stopped Gulp watch and started the 2 sites in Local after and it doesn’t seem to have any affect on the high energy impact. I also restarted Local and same results. Unfortunately doesn’t seem to have an affect on it. @clay am I the only one who has had this particular issue as far as you know? I just can’t think of anything unique about my setup that would make me any different than the next guy.