I just installed a fresh copy of latest XAMPP and started Apache and MySQL. Checked the task manager and by default empty MySQL with no databases running eats up over 400MB of ram out of nowhere while not in use and when idling. E.g. it's stuck at 421.6MB.
So, just was wondering if this is supposed to be like that? Running on Win8 x64 Pro.
The default configuration is designed to permit a MySQL server to start on a virtual machine that has approximately 512MB of RAM. You can improve MySQL performance by increasing the values of certain cache and buffer-related system variables.
Memory Allocation in MySQLMemory plays a significant resource for speed and efficiency when handling concurrent transactions and running big queries. Each thread in MySQL demands memory which is used to manage client connections, and these threads share the same base memory.
There is no mininum requirement, If Windows runs (or Linux) Xampp will run as well. If you decide to use Linux, you may use old hardware (like Pentium 2 or older), 128MB RAM will be sufficient and a 20GB HD will be big enough.
It's just not normal, it uses that much ram for nothing.. same on my system, with a DB with 4 tables and about ~30 records.
To significantly(!) lower the RAM usage, just add the following line to your config under
[mysqld]
table_definition_cache = 200
that should do the trick
(atleast it did for me, running XAMPP 1.8.3-2 MySQL 5.6.14)
Only 400 Mbytes? That's not much for a database and not much for a modern computer. You can fix the parameters to use more memory. If you are on a memory-limited device, you might consider the SQLite database.
More seriously, databases use lots of memory to increase performance. The code itself isn't small. Even with no data, databases reserve space for something called a page cache and for various other caches in memory. These get filled as they are used. Typically, you can set a threshold for total memory size, so the memory image will not grow bigger than a maximum, even when the data is much, much, much larger.
MySQL documentation does talk about memory usage here. Here is another article about memory usage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With