Sasa Posted January 9, 2015 Report Share Posted January 9, 2015 Kur un kā var samazināt mysql vienlaicīgās konekcijas? Quote Link to comment Share on other sites More sharing options...
Val Posted January 9, 2015 Report Share Posted January 9, 2015 Labojot mysql konfigu. http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_connections Quote Link to comment Share on other sites More sharing options...
Sasa Posted January 9, 2015 Author Report Share Posted January 9, 2015 paldies, par norādi. man tika ieteiks samazināt vienlaicīgās konekcijas pēc munin grafiku apskates, bet īsti nezinu kādam nolūkam, ja tās konekcijas būs pārāk maz visiem var nepietikt, vai es to parametru nepareizi saprotu? Quote Link to comment Share on other sites More sharing options...
Val Posted January 9, 2015 Report Share Posted January 9, 2015 iečeko mysqltuner.pl - kaut palīdzēs izrēķināt, cik katra konekcija apēd operatīvo atmiņu un vai teorētisko konekciju skaits maz ir iespējams ar esošo ram apjomu. Quote Link to comment Share on other sites More sharing options...
Sasa Posted January 17, 2015 Author Report Share Posted January 17, 2015 Palaižot to skriptu šādu rezultātu izvada. Kā lai saprot kas ir kas? >> MySQLTuner 1.4.0 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering [OK] Logged in using credentials from debian maintenance account. [OK] Currently running supported MySQL version 5.5.35-0+wheezy1-log [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM [--] Data in MyISAM tables: 238M (Tables: 260) [--] Data in InnoDB tables: 1G (Tables: 307) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17) [--] Data in MEMORY tables: 0B (Tables: 4) [!!] Total fragmented tables: 328 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 1d 16h 59m 25s (1M q [13.183 qps], 61K conn, TX: 7B, RX: 285M) [--] Reads / Writes: 82% / 18% [--] Total buffers: 192.0M global + 2.7M per thread (151 max threads) [OK] Maximum possible memory usage: 597.8M (29% of installed RAM) [OK] Slow queries: 4% (94K/1M) [OK] Highest usage of available connections: 19% (29/151) [OK] Key buffer size / total MyISAM indexes: 16.0M/99.7M [OK] Key buffer hit rate: 99.3% (65M cached / 441K reads) [OK] Query cache efficiency: 66.3% (1M cached / 1M selects) [!!] Query cache prunes per day: 153619 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 242K sorts) [OK] Temporary tables created on disk: 23% (43K on disk / 184K total) [OK] Thread cache hit rate: 99% (77 created / 61K connections) [!!] Table cache hit rate: 0% (400 open / 619K opened) [OK] Open file limit used: 44% (453/1K) [OK] Table locks acquired immediately: 99% (958K immediate / 958K locks) [!!] InnoDB buffer pool / data size: 128.0M/1.4G [OK] InnoDB log waits: 0 -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Increase table_open_cache gradually to avoid file descriptor limits Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C Variables to adjust: query_cache_size (> 16M) table_open_cache (> 400) innodb_buffer_pool_size (>= 1G) Quote Link to comment Share on other sites More sharing options...
Plutons Posted January 17, 2015 Report Share Posted January 17, 2015 (edited) Nu viena lieta jau ir skaidri parādīta, un to varēja arī sagooglēt. Mysql konfig failā tev jānorādā vērtības šiem( iekavās norādīta mazākā piešķiramā vērtība katram paramteram tavā situācijā) query_cache_size (> 16M)table_open_cache (> 400)innodb_buffer_pool_size (>= 1G) Konfigu var meklēt vai nu /etc/my.cnf vai /etc/mysql/my.cnf Vērtības jānorāda šādi : query_cache_size = 16Mtable_open_cache = 400innodb_buffer_pool_size = 1G Edited January 17, 2015 by Plutons Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.