Posted by & filed under Programming.

Is XAMPP slow?

I’ve used XAMPP for pretty much as long as I’ve been doing web development. It makes it trivial to get Apache, MySQL, and PHP set up.Since upgrading from Windows 7 to Windows 10 though I’ve noticed it was running much slower. I just assumed that XAMPP is slow. There was also an upgrade to XAMPP as part of that, although I don’t remember what versions.

The slowness was especially noticeable working on Moodle plugins. It was almost unusable, although that’s not too surprising with the 250-300 database tables that Moodle uses.

Googling brought a bunch of potential solutions

  • Disable IPv6
  • Edit hosts file to point 127.0.0.1 to localhost
  • Exclude Apache, MySQL, and PHP from firewall

And all of these seemed to help just a little bit, but so little that it could have just been psychological.

CPU Tweaks

Minimum Processor State for slow XAMPPThen I can across this site with possibly the best domain name I’ve ever seen. Seriously, ineed.coffee for a domain name. That’s awesome.

The suggestion was that Windows 8 changed a setting where the CPU could drop down to 5% to save power. Turns out the same setting is in Windows 10 as well.

The setting you’re looking for is Minimum Processor State. It’s under the Processor Power Management category.

On mine the setting was 5% for both plugged in and on battery. The way I understand this setting, it’s how low the processor can go to try and save power. I understand slowing everything down to try and save power when running off battery. But, when my computer is plugged in it should be running as fast as it can. So I bumped it up to 100% for the plugged in setting and left it at 5% for running off of battery.

And the difference was significant. And not just for XAMPP. NetBeans is running much better now as well. I don’t think that NetBeans has fallen to “Not Responding” since I made this change.

my.ini

Moodle still wasn’t running as quickly as it was on a little $5 a month droplet on Digital Ocean, which seemed odd.

That lead me to the my.ini config file. Turns out that XAMPP was using the mysql-small settings file. In the comments right at the top of the config file it says that it’s meant to use <= 64 megs, which should be fine for “occasional” use. Occasional does not describe me working on web sites, so I swapped it out with the config file for 2gb+ systems.

And now it’s all running like it should be and I’m not wasting my time watching pages load.

4 Responses to “XAMPP Slow on Windows 10”

    • Ryan

      It’s the my-huge.ini file that comes with XAMPP. The comments say it’s meant for systems using 1-2gb for MariaDB.

      Reply
  1. Nakis

    Changing power profile to high performance and replacing my.ini with my-huge.ini was enough for me.
    Thanks for the tip.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *