{"id":1260,"date":"2018-02-16T11:30:05","date_gmt":"2018-02-16T09:30:05","guid":{"rendered":"http:\/\/www.ayhanarda.com\/blog\/?p=1260"},"modified":"2018-02-16T11:30:05","modified_gmt":"2018-02-16T09:30:05","slug":"tuning-primer-kurulumu-ve-kullanimi","status":"publish","type":"post","link":"https:\/\/www.ayhanarda.com\/blog\/2018\/02\/tuning-primer-kurulumu-ve-kullanimi\/","title":{"rendered":"Tuning Primer Kurulumu ve Kullan\u0131m\u0131"},"content":{"rendered":"<h4>Tuning Primer Kurulumu ve Kullan\u0131m\u0131<\/h4>\n<p>Tuning Primer bir Mysql Tuner Alternatifi , a\u015fa\u011f\u0131daki komutlar\u0131 s\u0131ras\u0131 ile dosyas\u0131n\u0131 indirip \u00e7al\u0131\u015ft\u0131rabilirsiniz. Mysql Tuner kadar olmasada yeterli bilgiler mevcut ve kullanmaya de\u011fer.<\/p>\n<p>[root@ayhanarda ~]# <strong>cd \/usr\/local\/bin<\/strong><\/p>\n<p>[root@ayhanarda bin]# <strong>wget https:\/\/launchpadlibrarian.net\/78745738\/tuning-primer.sh<\/strong><\/p>\n<p>\u015eimdi s\u0131ra \u00e7al\u0131\u015ft\u0131rmaya geldi.<\/p>\n<p>[root@ayhanarda bin]# <strong>tuning-primer.sh<\/strong><\/p>\n<p>\u00c7al\u0131\u015ft\u0131r\u0131ld\u0131\u011f\u0131nda mysql in conf u ile elde etti\u011fi de\u011ferleri en iyi optimizasyon i\u00e7in kar\u015f\u0131la\u015ft\u0131rarak size \u00f6neriler sunuyor.<\/p>\n<p>Mysql in versiyonundan ne kadar s\u00fcredir servis verdi\u011fine , a\u00e7\u0131k oldu\u011fu son s\u00fcre i\u00e7inde ka\u00e7 query ye cevap verdi\u011fine, anl\u0131k ba\u011flant\u0131 say\u0131s\u0131na , slow query olup olmad\u0131\u011f\u0131na , cache size \u0131n\u0131z\u0131n yeterli olup olmad\u0131\u011f\u0131na , max connections de\u011ferinizin anl\u0131k de\u011ferinizi kar\u015f\u0131lay\u0131p kar\u015f\u0131lamad\u0131\u011f\u0131na , memory kullan\u0131m\u0131n\u0131za , join lerinize , temp alan\u0131n\u0131za , tablo lock say\u0131n\u0131za kadar \u00f6l\u00e7\u00fcp bi\u00e7ip size \u00f6neriler sunuyor. \u00d6rne\u011fin ben \u00e7aql\u0131\u015ft\u0131rd\u0131mda \u00e7\u0131kt\u0131s\u0131 a\u015fa\u011f\u0131daki gibi oldu.<\/p>\n<p>Ancak \u00f6ncesinde 48 saat kadar mysql servisinizin a\u00e7\u0131k olmas\u0131 daha do\u011fru sonu\u00e7lar alman\u0131z\u0131 sa\u011flayacakt\u0131r.<\/p>\n<p>MySQL Version 10.0.34-MariaDB x86_64<\/p>\n<p>Uptime = 1 days 18 hrs 21 min 54 sec<br \/>\nAvg. qps = 1402<br \/>\nTotal Questions = 213875408<br \/>\nThreads Connected = 34<\/p>\n<p>SLOW QUERIES<br \/>\nThe slow query log is NOT enabled.<br \/>\nCurrent long_query_time = 10.000000 sec.<br \/>\nYou have 8 out of 213875496 that take longer than 10.000000 sec. to complete<br \/>\nYour long_query_time seems to be fine<\/p>\n<p>WORKER THREADS<br \/>\nCurrent thread_cache_size = 200<br \/>\nCurrent threads_cached = 103<br \/>\nCurrent threads_per_sec = 0<br \/>\nHistoric threads_per_sec = 0<br \/>\nYour thread_cache_size is fine<\/p>\n<p>MAX CONNECTIONS<br \/>\nCurrent max_connections = 200<br \/>\nCurrent threads_connected = 35<br \/>\nHistoric max_used_connections = 137<br \/>\nThe number of used connections is 68% of the configured maximum.<br \/>\nYour max_connections variable seems to be fine.<\/p>\n<p>No InnoDB Support Enabled!<\/p>\n<p>MEMORY USAGE<br \/>\nMax Memory Ever Allocated : 13.54 G<br \/>\nConfigured Max Per-thread Buffers : 8.38 G<br \/>\nConfigured Max Global Buffers : 7.79 G<br \/>\nConfigured Max Memory Limit : 16.18 G<br \/>\nPhysical Memory : 23.36 G<br \/>\nMax memory limit seem to be within acceptable norms<\/p>\n<p>KEY BUFFER<br \/>\nCurrent MyISAM index space = 1.53 G<br \/>\nCurrent key_buffer_size = 1.00 G<br \/>\nKey cache miss rate is 1 : 99348<br \/>\nKey buffer free ratio = 54 %<br \/>\nYour key_buffer_size seems to be too high.<br \/>\nPerhaps you can use these resources elsewhere<\/p>\n<p>QUERY CACHE<br \/>\nQuery cache is enabled<br \/>\nCurrent query_cache_size = 800 M<br \/>\nCurrent query_cache_used = 800 M<br \/>\nCurrent query_cache_limit = 100 M<br \/>\nCurrent Query cache Memory fill ratio = 100.00 %<br \/>\nCurrent query_cache_min_res_unit = 4 K<br \/>\nMySQL won&#8217;t cache query results that are larger than query_cache_limit in size<\/p>\n<p>SORT OPERATIONS<br \/>\nCurrent sort_buffer_size = 1 M<br \/>\nCurrent read_rnd_buffer_size = 768 K<br \/>\nSort buffer seems to be fine<\/p>\n<p>JOINS<br \/>\n\/usr\/local\/bin\/tuning-primer.sh: line 402: export: `2097152&#8242;: not a valid identifier<br \/>\nCurrent join_buffer_size = 40.00 M<br \/>\nYou have had 576657 queries where a join could not use an index properly<br \/>\nYou have had 1303 joins without keys that check for key usage after each row<br \/>\njoin_buffer_size &gt;= 4 M<br \/>\nThis is not advised<br \/>\nYou should enable &#8220;log-queries-not-using-indexes&#8221;<br \/>\nThen look for non indexed joins in the slow query log.<\/p>\n<p>OPEN FILES LIMIT<br \/>\nCurrent open_files_limit = 138451 files<br \/>\nThe open_files_limit should typically be set to at least 2x-3x<br \/>\nthat of table_cache if you have heavy MyISAM usage.<br \/>\nYour open_files_limit value seems to be fine<\/p>\n<p>TABLE CACHE<br \/>\nCurrent table_open_cache = 69120 tables<br \/>\nCurrent table_definition_cache = 65960 tables<br \/>\nYou have a total of 59378 tables<br \/>\nYou have 65487 open tables.<br \/>\nThe table_cache value seems to be fine<\/p>\n<p>TEMP TABLES<br \/>\nCurrent max_heap_table_size = 256 M<br \/>\nCurrent tmp_table_size = 1.46 G<br \/>\nOf 17855233 temp tables, 32% were created on disk<br \/>\nEffective in-memory tmp_table_size is limited to max_heap_table_size.<br \/>\nPerhaps you should increase your tmp_table_size and\/or max_heap_table_size<br \/>\nto reduce the number of disk-based temporary tables<br \/>\nNote! BLOB and TEXT columns are not allow in memory tables.<br \/>\nIf you are using these columns raising these values might not impact your<br \/>\nratio of on disk temp tables.<\/p>\n<p>TABLE SCANS<br \/>\nCurrent read_buffer_size = 1 M<br \/>\nCurrent table scan ratio = 309 : 1<br \/>\nread_buffer_size seems to be fine<\/p>\n<p>TABLE LOCKING<br \/>\nCurrent Lock Wait ratio = 1 : 1582<br \/>\nYou may benefit from selective use of InnoDB.<br \/>\nIf you have long running SELECT&#8217;s against MyISAM tables and perform<br \/>\nfrequent updates consider setting &#8216;low_priority_updates=1&#8217;<\/p>\n<p>Ayhan ARDA<\/p>\n<div style=\"padding-bottom:20px; padding-top:10px;\" class=\"hupso-share-buttons\"><!-- Hupso Share Buttons - https:\/\/www.hupso.com\/share\/ --><a class=\"hupso_toolbar\" href=\"https:\/\/www.hupso.com\/share\/\"><img decoding=\"async\" src=\"https:\/\/static.hupso.com\/share\/buttons\/lang\/tr\/share-medium.png\" style=\"border:0px; padding-top: 5px; float:left;\" alt=\"Share Button\"\/><\/a><script type=\"text\/javascript\">var hupso_services_t=new Array(\"Twitter\",\"Facebook\",\"Google Plus\",\"Pinterest\",\"Linkedin\");var hupso_background_t=\"#EAF4FF\";var hupso_border_t=\"#66CCFF\";var hupso_toolbar_size_t=\"medium\";var hupso_image_folder_url = \"\";var hupso_twitter_via=\"ayhanarda\";var hupso_url_t=\"\";var hupso_title_t=\"Tuning%20Primer%20Kurulumu%20ve%20Kullan%C4%B1m%C4%B1\";<\/script><script type=\"text\/javascript\" src=\"https:\/\/static.hupso.com\/share\/js\/share_toolbar.js\"><\/script><!-- Hupso Share Buttons --><\/div>","protected":false},"excerpt":{"rendered":"Tuning Primer Kurulumu ve Kullan\u0131m\u0131 Tuning Primer bir Mysql Tuner Alternatifi , a\u015fa\u011f\u0131daki komutlar\u0131 s\u0131ras\u0131 ile dosyas\u0131n\u0131 indirip \u00e7al\u0131\u015ft\u0131rabilirsiniz. Mysql Tuner kadar olmasada yeterli bilgiler mevcut ve kullanmaya de\u011fer. [root@ayhanarda ~]# cd \/usr\/local\/bin [root@ayhanarda bin]# wget https:\/\/launchpadlibrarian.net\/78745738\/tuning-primer.sh \u015eimdi s\u0131ra \u00e7al\u0131\u015ft\u0131rmaya geldi. [root@ayhanarda bin]# tuning-primer.sh \u00c7al\u0131\u015ft\u0131r\u0131ld\u0131\u011f\u0131nda mysql in conf u ile elde etti\u011fi de\u011ferleri en iyi [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[66,391],"tags":[1232,1255,1256,1241,1238,1245,1242,1250,1254,1253,1239,1229,1226,1252,1244,1248,1243,1247,1251,1246,1240,1249],"class_list":["post-1260","post","type-post","status-publish","format-standard","hentry","category-linux-2","category-mysql-2","tag-innodb","tag-innodb-kullanimi","tag-join_buffer_size","tag-key_buffer_size","tag-lock-wait-ratio","tag-low_priority_updatesi","tag-max_connections","tag-max_heap_table_size","tag-myisam-kullanimi","tag-myisam-usage","tag-mysql-best-optimization","tag-mysql-optimizasyonu","tag-mysql-performance","tag-open_files_limit","tag-query_cache_size","tag-read_buffer_size","tag-slow-query","tag-sort_buffer_size","tag-table_open_cache","tag-temp-tables","tag-thread_cache_size","tag-tmp_table_size"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/posts\/1260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/comments?post=1260"}],"version-history":[{"count":1,"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/posts\/1260\/revisions"}],"predecessor-version":[{"id":1261,"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/posts\/1260\/revisions\/1261"}],"wp:attachment":[{"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/media?parent=1260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/categories?post=1260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ayhanarda.com\/blog\/wp-json\/wp\/v2\/tags?post=1260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}