Re: Conoscete un "proxy" per avere MySQL in ram?
RedFoxy <[email protected]> Fri, 13 Jun 2014 23:49:15 +0200
| Newsgroups | gmane.os.freebsd.italian.esperti |
|---|---|
| Message-ID | <[email protected]> |
Ok, scusate se riesumo questo mio thread ma volevo portarvi a conoscenza dei risultati dopo 25 giorni di up con tutte le modifiche alle tabelle e al my.cnf: Di seguito prima l’output di tuning-prime seguito da mysqltuner, credo di aver migliorato di molto le statistiche che vengono mostrate, anche se ancora qualcosa forse si potrebbe fare, specialmente per quello mostrato da mysqltuner ma forse esagero, in ogni caso i siti sono diventati più fluidi -- MYSQL PERFORMANCE TUNING PRIMER -- - By: Matthew Montgomery - MySQL Version 5.6.17-log amd64 Uptime = 25 days 1 hrs 38 min 52 sec Avg. qps = 81 Total Questions = 175798407 Threads Connected = 1 Server has been running for over 48hrs. It should be safe to follow these recommendations To find out more information on how each of these runtime variables effects performance visit: http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html Visit http://www.mysql.com/products/enterprise/advisors.html for info about MySQL's Enterprise Monitoring and Advisory Service SLOW QUERIES The slow query log is NOT enabled. Current long_query_time = 1.000000 sec. You have 4037 out of 175798446 that take longer than 1.000000 sec. to complete [: 0.00000000000000000000: bad number Your long_query_time seems to be fine BINARY UPDATE LOG The binary update log is enabled Binlog sync is not enabled, you could loose binlog records during a server crash WORKER THREADS Current thread_cache_size = 34 Current threads_cached = 16 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine MAX CONNECTIONS Current max_connections = 40 Current threads_connected = 1 Historic max_used_connections = 17 The number of used connections is 42% of the configured maximum. Your max_connections variable seems to be fine. INNODB STATUS Current InnoDB index space = 21 M Current InnoDB data space = 50 M Current InnoDB buffer pool free = 16 % Current innodb_buffer_pool_size = 64 M Depending on how much space your innodb indexes take up it may be safe to increase this value to up to 2 / 3 of total system memory MEMORY USAGE Max Memory Ever Allocated : 1.78 G Configured Max Per-thread Buffers : 676 M Configured Max Global Buffers : 1.50 G Configured Max Memory Limit : 2.16 G Physical Memory : 16.75 G Max memory limit seem to be within acceptable norms KEY BUFFER Current MyISAM index space = 1.38 G Current key_buffer_size = 1.17 G Key cache miss rate is 1 : 283 Key buffer free ratio = 64 % Your key_buffer_size seems to be fine QUERY CACHE Query cache is enabled Current query_cache_size = 256 M Current query_cache_used = 106 M Current query_cache_limit = 32 M Current Query cache Memory fill ratio = 41.74 % Current query_cache_min_res_unit = 1 K MySQL won't cache query results that are larger than query_cache_limit in size SORT OPERATIONS Current sort_buffer_size = 256 K Current read_rnd_buffer_size = 256 K Sort buffer seems to be fine JOINS Current join_buffer_size = 16.00 M You have had 87811 queries where a join could not use an index properly You have had 5277 joins without keys that check for key usage after each row join_buffer_size >= 4 M This is not advised You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. OPEN FILES LIMIT Current open_files_limit = 40000 files The open_files_limit should typically be set to at least 2x-3x that of table_cache if you have heavy MyISAM usage. Your open_files_limit value seems to be fine TABLE CACHE Current table_open_cache = 3000 tables Current table_definition_cache = 16384 tables You have a total of 1651 tables You have 2401 open tables. The table_cache value seems to be fine TEMP TABLES Current max_heap_table_size = 320 M Current tmp_table_size = 320 M Of 2614716 temp tables, 15% were created on disk Created disk tmp tables ratio seems fine TABLE SCANS Current read_buffer_size = 128 K Current table scan ratio = 37 : 1 read_buffer_size seems to be fine TABLE LOCKING Current Lock Wait ratio = 1 : 1548 You may benefit from selective use of InnoDB. If you have long running SELECT's against MyISAM tables and perform frequent updates consider setting 'low_priority_updates=1' If you have a high concurrency of inserts on Dynamic row-length tables consider setting 'concurrent_insert=ALWAYS'. >> MySQLTuner 1.3.0 - Major Hayden <[email protected]> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering [OK] Currently running supported MySQL version 5.6.17-log [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM [--] Data in MyISAM tables: 3G (Tables: 1153) [--] Data in InnoDB tables: 49M (Tables: 410) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 52) [--] Data in MEMORY tables: 1M (Tables: 8) [!!] Total fragmented tables: 53 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 25d 1h 39m 46s (175M q [81.165 qps], 9M conn, TX: 2659B, RX: 60B) [--] Reads / Writes: 74% / 26% [--] Total buffers: 1.8G global + 16.9M per thread (40 max threads) [OK] Maximum possible memory usage: 2.5G (15% of installed RAM) [OK] Slow queries: 0% (4K/175M) [OK] Highest usage of available connections: 42% (17/40) [OK] Key buffer size / total MyISAM indexes: 1.2G/1.4G [OK] Key buffer hit rate: 99.6% (6B cached / 24M reads) [OK] Query cache efficiency: 57.4% (60M cached / 105M selects) [!!] Query cache prunes per day: 52972 [OK] Sorts requiring temporary tables: 0% (66K temp sorts / 8M sorts) [!!] Joins performed without indexes: 93093 [OK] Temporary tables created on disk: 15% (467K on disk / 3M total) [OK] Thread cache hit rate: 99% (17 created / 9M connections) [!!] Table cache hit rate: 3% (2K open / 71K opened) [OK] Open file limit used: 6% (2K/40K) [OK] Table locks acquired immediately: 99% (136M immediate / 136M locks) [OK] InnoDB buffer pool / data size: 64.0M/49.8M [OK] InnoDB log waits: 0 -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Increasing the query_cache size over 128M may reduce performance Adjust your join queries to always utilize indexes Increase table_cache gradually to avoid file descriptor limits Read this before increasing table_cache over 64: http://bit.ly/1mi7c4C Variables to adjust: query_cache_size (> 256M) [see warning above] join_buffer_size (> 16.0M, or always use indexes with joins) table_cache (> 3000) _______________________________________________ Esperti mailing list [email protected] http://mailman.gufi.org/mailman/listinfo/esperti