Skip to content

XAMPP Slow on Windows 10

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.

Published inProgramming

8 Comments

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

  1. Nakis Nakis

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

    • Matt Hendrix Matt Hendrix

      Worked for me too. You can find the my.ini file in xampp\mysql\bin\my.ini and the large.ini file in xampp\mysql\large.ini

      Thanks for the great tips.

  2. ALEX MAURICIO HENAO HERNANDEZ ALEX MAURICIO HENAO HERNANDEZ

    I Had the same problem with xampp, and the problem was WINDOWS DEFENDER, if you disabled the windows defender protection, xampp is faster (normal speed), Also you can search the xampp folder as exlusion in windows defender. these is the solution.

  3. Thomas Gottschall Thomas Gottschall

    I had the same problem and the idea for solving it went like this (will work only for some setting, not in general):
    I thought about running the whole database with the memory engine but the shortcomings were just too many (cannot really copy all types at startup since they are not identical to e.g. innoDB). A colleague thought about having the database files on a RAM disk (my database is quite small). I thought why not trying to have the whole xampp on the RAM disk (my installation needs 600MB including my complete project). Just tried it this morning. It works like a charm! Expect the speed of your application to be as speedy as a real desktop application. Even better: if you have have enough of RAM and a SSD you can even snapshots the RAM disk regularly. The only problem would be a power outage which isn’t really one for me since this runs completely on a notebook.

Leave a Reply

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