With one of the servers I have a strange problem with the optimization of mysql.
Specially with
query_cache_size and table_cache
According to mysqltuner:
The advise is to increase query_cache_size and table_cache. Yet it advises the same with a query_cache_size of 1024M and a table_cache of 128K!Code:>> MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.0.91-community-log [!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM -------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 253M (Tables: 1771) [--] Data in InnoDB tables: 208K (Tables: 13) [!!] Total fragmented tables: 2 -------- Performance Metrics ------------------------------------------------- [--] Up for: 1d 4h 24m 22s (17M q [169.407 qps], 140K conn, TX: 2B, RX: 56M) [--] Reads / Writes: 77% / 23% [--] Total buffers: 843.0M global + 5.2M per thread (300 max threads) [!!] Allocating > 2GB RAM on 32-bit systems can cause system instability [!!] Maximum possible memory usage: 2.3G (41% of installed RAM) [OK] Slow queries: 0% (3/17M) [OK] Highest usage of available connections: 28% (87/300) [OK] Key buffer size / total MyISAM indexes: 128.0M/98.3M [OK] Key buffer hit rate: 100.0% (706M cached / 344K reads) [OK] Query cache efficiency: 88.2% (13M cached / 15M selects) [!!] Query cache prunes per day: 40200 [OK] Sorts requiring temporary tables: 0% (12 temp sorts / 172K sorts) [OK] Temporary tables created on disk: 10% (29K on disk / 288K total) [OK] Thread cache hit rate: 99% (87 created / 140K connections) [!!] Table cache hit rate: 0% (106 open / 20K opened) [OK] Open file limit used: 0% (170/20K) [OK] Table locks acquired immediately: 99% (2M immediate / 2M locks) [OK] InnoDB data size / buffer pool: 208.0K/1.0M -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Increasing the query_cache size over 128M may reduce performance Increase table_cache gradually to avoid file descriptor limits Variables to adjust: query_cache_size (> 512M) [see warning above] table_cache (> 4096)
Here is my.cnf
The server has 6GB of ram and although in the last 24h there have been a max of 87 connections. On a monthly basis the max connection reaches 200 to 260.Code:[mysqld] delayed_insert_timeout=600 flush_time=14400 innodb_buffer_pool_size=1M join_buffer_size=2M key_buffer_size=128M local-infile=0 log_slow_queries=/var/log/mysql-slow.log max_allowed_packet=60M max_heap_table_size=200M myisam_sort_buffer_size=6M open_files_limit=20K query_cache_limit=32M query_cache_min_res_unit=2048 query_cache_size=512M read_buffer_size=1M read_rnd_buffer_size=1M safe-show-database set-variable = max_connections=300 sort_buffer_size=1M table_cache=4K thread_cache_size=128 thread_concurrency=4 tmp_table_size=200M wait_timeout=1200 interactive_timeout=2400 query_cache_type=1 [isamchk] key_buffer_size = 128M sort_buffer_size = 128M read_buffer_size = 2M write_buffer_size = 2M [myisamchk] key_buffer_size = 128M sort_buffer_size = 128M read_buffer_size = 2M write_buffer_size = 2M
I am doing something wrong, because the mysqltuner advise seems strange to me. Perhaps it is the flush, but I cannot figure it out.
What do you guys think?



LinkBack URL
About LinkBacks
Reply With Quote





