
08-01-11, 09:41 AM
|
 |
Member
|
|
Join Date: Aug 2010
Posts: 32
|
|
Parameters of MySQL Settings/variables in the my.cnf
Parameters of MySQL Settings/variables in the my.cnf file.
Quote:
1. query_cache_size:
*********************
If the same queries has to be run on the database, the outcome of the query is also going to be the same, MySQL server can cache the result, so the work load on the MySQL server will get reduced. This is quite a handy settings on very busy server.
2. key_buffer_size:
*******************
In simple words we can understand the buffer size as size of buffer allocated on MySQL server to execute query. The execution speed of MySQL command depends on this.
key_buffer_size should not be set more then 50% of server's total memory
* To check the actual performance of the buffer please check these variables: key_read_requests, key_reads, key_write_requests, and key_writes.
* The ratio of key_read to the value of key_reads_requests, should be less than 0.01.
And ratio of key_write by the value of key_writes_requests, should be less than 1.
3. table_cache:
*****************
If the MySQl server has to go through the same high number of table many times, it is cached. So the speed of operation increases.This parameter is vary important on shared server, as on shared server many MySQL Query may get executed simultaneously.
4. sort_buffer:
***************
This setting used to speed up the the database check operations, or sorts running.
5. read_rnd_buffer_size:
**************************
On MySQL server the read_rnd_buffer is used to read the tables once it is sorted. Having its value set to high the performance of the server can be increased.
6. thread_cache:
******************
This settings is tweaked to reduce the load on CPU of the server if the server gets the connections in very short span of time ( very quickly).
if this is the case please set its value high enough.
7. tmp_table_size:
*******************
This setting is for the size of the memory allocated on MySQL server for executing statements in the database before the modification in the database is saved on the hard disk of the server.
It is not advisable to increase the tmp_table_size, so please set the appropriate value while optimizing MySQL
8. query_cache_size
********************
This function helps in reducing the MySQL server workload if the same query is getting executed on the server time and again. For setting query_cache_size it is importent to set query_cache_type
There are three status for query caching;
1. Disabled - query_cache_type = 0
2. Enabled - query_cache_type = 1
3. On Demand - query_cache_type = 2
If its value is set to o then the query_cache_size will take effect, so to set query_cache_size you will have to use query_cache_type = 1
|
================================================== ====
|