Jump to content
php.lv forumi

MySql vienlaicīgās konekcijas


Recommended Posts

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?

Link to comment
Share on other sites

  • 2 weeks later...

Palaižot to skriptu šādu rezultātu izvada. Kā lai saprot kas ir kas?
 

>>  MySQLTuner 1.4.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] 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)

Link to comment
Share on other sites

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 = 16M
table_open_cache = 400
innodb_buffer_pool_size = 1G

Edited by Plutons
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...