Default MySQL settings?

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,354
I have a CentOS 6.2 64bit server with 32GB RAM, running DirectAdmin, it is used for shared hosting clients. I am running MySQL 5.5.22

I have only added three lines to my.cnf, those are:

Code:
[mysqld]
innodb 
local-infile=0

However it seems the server has alot of unused RAM:

Code:
[root@server ~]# free -m -g
             total       used       free     shared    buffers     cached
Mem:            31         29          2          0          1         23
-/+ buffers/cache:          3         27
Swap:            1          0          1

Here is same output but with more detail:

Code:
[root@server ~]# free -m
             total       used       free     shared    buffers     cached
Mem:         32092      29923       2168          0       2015      24370
-/+ buffers/cache:       3537      28554
Swap:         2047          0       2047
1: What confuses me, is what are the defaults settings/values for MySQL when I am not overriding the values in my.cnf?

2: Are the default MySQL values very limited so that I must raise them higher in my.cnf, or is the default MySQL values more generic so that it will continue to use more and more RAM when I get more and more customers on the server?

3: As loong as I have so much free memory, I like MySQL to always use all the RAM it needs for all the sites, without limiting it - is that best achieved without setting any custom my.cnf values (like a almost empty my.cnf file)?

I have searched and read a lot, but mostly all discussion is about optimizing my.cnf file, however I don't want to do that before I understand how the default MySQL settings is - because I am afraid I would lower the limit then, and I don't want to lower them, I want my server to generic use as much as needed of available RAM.

Also I am afraid to run automatic test to generate my.cnf values, because my server will continue to get more clients/sites, and therfor MySQL need of resources will change and increase as time goes by ...
 
Last edited:
I have read it many times before, but it does not answer any of my questions. Also it is very old, written Jan 18, 2009, also I am using MySQL 5.5.22. So that page does not help, and I can't copy over any settings in my.cnf without understanding the default values. I would risk that I ended up lowering the resources available for MySQL. I want MySQL to use all it needs, and not be limited.
 
1: What confuses me, is what are the defaults settings/values for MySQL when I am not overriding the values in my.cnf?

You can learn them in console or phpMyAdmin under "variables" section. Or run

Code:
mysql> SHOW VARIABLES;


2: Are the default MySQL values very limited so that I must raise them higher in my.cnf, or is the default MySQL values more generic so that it will continue to use more and more RAM when I get more and more customers on the server?

Sure there are limited, you can use this tool mysqltuner.pl (www.mysqltuner.pl) to learn things which needs to be tuned. There you can see, how much RAM your MySQL can use.

3: As loong as I have so much free memory, I like MySQL to always use all the RAM it needs for all the sites, without limiting it - is that best achieved without setting any custom my.cnf values (like a almost empty my.cnf file)?

That's not a good choice. You should never give MySQL too much RAM, as it might make MySQL unstable in some particular cases.

I have searched and read a lot, but mostly all discussion is about optimizing my.cnf file, however I don't want to do that before I understand how the default MySQL settings is - because I am afraid I would lower the limit then, and I don't want to lower them, I want my server to generic use as much as needed of available RAM.

Also I am afraid to run automatic test to generate my.cnf values, because my server will continue to get more clients/sites, and therfor MySQL need of resources will change and increase as time goes by ...

You might to hire somebody then, me or anybody else.
 
I still do not understand what the default MySQL 5.5.x values/settings is when not using a custom my.cnf. But nevermind. I will teach myself.
 
Back
Top