 As a developer, I have configured MySQL to launch automatically at startup, because I will probably be using it, if this is a workday, and if my computer is starting up during work hours, and if my work these days involves databases. That’s a lot of ifs. Quite often, I launch it but do not use it, so, it would be nice if it is as unobtrusive as possible. Unfortunately, it is obtrusive in at least one way: it occupies a large amount of memory, which is unreasonably large for a piece of software that is just sitting there doing nothing.
As a developer, I have configured MySQL to launch automatically at startup, because I will probably be using it, if this is a workday, and if my computer is starting up during work hours, and if my work these days involves databases. That’s a lot of ifs. Quite often, I launch it but do not use it, so, it would be nice if it is as unobtrusive as possible. Unfortunately, it is obtrusive in at least one way: it occupies a large amount of memory, which is unreasonably large for a piece of software that is just sitting there doing nothing.
In this post I show how to configure it to occupy as little memory as possible.
The following image shows the mind-boggling amount of memory occupied by MySQL 5.6 server on Windows 7 64-bit.
 
(This is despite the fact that during installation I explicitly specified that this MySQL server is going to be used for development, not for production.)
A quick search on the web shows that this preposterous amount of memory can be reduced to something less preposterous by editing my.ini (usually found in some place like ProgramData\MySQL\MySQL Server 5.6) and replacing the following line:
table_definition_cache=1400
with this line:
table_definition_cache=400
Unfortunately, even though the savings are huge, the memory footprint of mysql is still nothing short of gargantuan:
		
			Read more »