I’m on MacOs, with i9. And I can see that local sites are terrible slow. I’m using now Parallels, but with VirtualBox was the same.
Even change to:
vagrant_memory: 8192 # in MB
Don’t make the site works better. Comparing to LocalWp it’s 500-1000% slower when navigating admin pages. Is there any way to speed up trellis with other settings rather giving more CPU/RAM to Vagrant?
When working with browser sync, 1/4 times page crash on PHP error, because the refresh is fired but the file is not fully copied to virtual machine and crashes. That makes me crazy.
I was doing some tests on clean Wordpress, without any plugin, and it’s still much slower from LocalWP.
Anyone else have similar issues and a good fix for it?
I’ve had poor localhost performance as well, but have been able to improve quite a bit over time. I have four observations to share:
Balanced CPU/RAM ratios. I tried increasing CPU’s and MB’s as you have, and then I came across an interesting explanation about the deleterious effects of too many procs in this context. I wish I could remember the explanation (or at least have the link to share), but I can’t find that info right now (I’ll add it to this thread if I find it again). The bottom line is that experimenting with the topic a bit, I found that a good balance for me was 1 CPU and 2048 MB. This combo is currently working well for me on a 4 year-old iMac (64 GB RAM), a 10 year-old iMac (12 GB RAM), and a new M1 (64 GB RAM). On the rare occasion I need to grow CPU count, my RAM GB’s are almost always twice the CPU count (or more).
Nginx and PHP settings. I usually start with the following in my group_vars/development/main.yml:
Multiple VM’s running at the same time. Running multiple boxes simultaneously works well with unique IP’s (per VM), but perf improved when I also specified unique host ports by adding something like config.vm.network :forwarded_port, guest: 22, host: 2005, id: "ssh", auto_correct: true …in the… Vagrant.configure('2') do |config| block of my Vagrantfile.
Performance is not consistent throughout the day. Whenever I go through occasional slow periods even though other sessions are quite fast, I look for slow or extraneous processes to shut down. I usually find something running in browser tabs that I don’t need.
Admittedly, I’ve not yet been able to match the performance of certain other tools (including Local), but I’m getting closer (quite close, in fact). If I account for the benefits of this toolset, the remaining (minor) perf challenges are usually acceptable to me.