mysqld cache defaults

Submitted by mator
on January 23, 2006 - 11:02am

Today was expecting mysql server with average 50 queries per second. Version of mysql server installed is 4.0.24. Found that query_cache_size is default to 0 so it's switched off. Changed /etc/my.cnf for a new size and noticed good cache hit ratio. Too bad this server is only 1Gb of ram, so i can't increase read_buffer_size/read_rnd_buffer_size to bigger values. Also seen too much of 'Opened tables', the value was 10222, so increased 'table_cache' from defaults.

PS: it's pretty cold in Moscow right now, about -25C and i'm falling in love with my girl.

mysql cache

mator
on
January 24, 2006 - 8:29am

ok. 22 hours of work gives following numbers:

# mysqladmin  status
Uptime: 82799  Threads: 80  Questions: 3113619  Slow queries: 226  Opens: 12375  
Flush tables: 1  Open tables: 647  Queries per second avg: 37.605
# mysqladmin ext | grep cache_
| Qcache_queries_in_cache  | 155       |
| Qcache_inserts           | 1071742   |
| Qcache_hits              | 1472503   |
| Qcache_lowmem_prunes     | 710357    |
| Qcache_not_cached        | 62957     |
| Qcache_free_memory       | 116056    |
| Qcache_free_blocks       | 38        |
| Qcache_total_blocks      | 468       |

notice a good cache hit ratio. i wonder why mysql.com don't enabled Qcache by default.

PS: i seen only debian OS having /etc/mysql/my.cnf with enabled QueryCache.

/mator

new article

mator
on
August 2, 2007 - 1:11am

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.