Advertisement
Guest User

pasta SQL tunning

a guest
Nov 26th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. root@pasta [~]# ./mysql.pl
  2.  
  3. >> MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
  4. >> Bug reports, feature requests, and downloads at http://mysqltuner.com/
  5. >> Run with '--help' for additional options and output filtering
  6.  
  7. -------- General Statistics --------------------------------------------------
  8. [--] Skipped version check for MySQLTuner script
  9. [OK] Currently running supported MySQL version 5.1.65-cll
  10. [OK] Operating on 32-bit architecture with less than 2GB RAM
  11.  
  12. -------- Storage Engine Statistics -------------------------------------------
  13. [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
  14. [--] Data in MyISAM tables: 266M (Tables: 937)
  15. [--] Data in InnoDB tables: 432K (Tables: 27)
  16. [!!] Total fragmented tables: 3
  17.  
  18. -------- Security Recommendations -------------------------------------------
  19. [OK] All database users have passwords assigned
  20.  
  21. -------- Performance Metrics -------------------------------------------------
  22. [--] Up for: 10m 53s (62K q [95.285 qps], 29K conn, TX: 32M, RX: 13M)
  23. [--] Reads / Writes: 86% / 14%
  24. [--] Total buffers: 704.0M global + 9.4M per thread (100 max threads)
  25. [OK] Maximum possible memory usage: 1.6G (80% of installed RAM)
  26. [OK] Slow queries: 0% (2/62K)
  27. [OK] Highest usage of available connections: 40% (40/100)
  28. [OK] Key buffer size / total MyISAM indexes: 256.0M/149.0M
  29. [OK] Key buffer hit rate: 99.9% (5M cached / 8K reads)
  30. [OK] Query cache efficiency: 64.7% (19K cached / 30K selects)
  31. [OK] Query cache prunes per day: 0
  32. [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
  33. [!!] Joins performed without indexes: 377
  34. [OK] Temporary tables created on disk: 6% (82 on disk / 1K total)
  35. [OK] Thread cache hit rate: 99% (40 created / 29K connections)
  36. [OK] Table cache hit rate: 51% (1K open / 2K opened)
  37. [OK] Open file limit used: 23% (1K/8K)
  38. [OK] Table locks acquired immediately: 98% (38K immediate / 39K locks)
  39. [OK] InnoDB data size / buffer pool: 432.0K/350.0M
  40.  
  41. -------- Recommendations -----------------------------------------------------
  42. General recommendations:
  43. Run OPTIMIZE TABLE to defragment tables for better performance
  44. MySQL started within last 24 hours - recommendations may be inaccurate
  45. Adjust your join queries to always utilize indexes
  46. Variables to adjust:
  47. join_buffer_size (> 1.0M, or always use indexes with joins)
  48.  
  49. root@pasta [~]#
  50.  
  51.  
  52.  
  53.  
  54. root@pasta [~]# ./tuning-primer.sh
  55.  
  56. -- MYSQL PERFORMANCE TUNING PRIMER --
  57. - By: Matthew Montgomery -
  58.  
  59. MySQL Version 5.1.65-cll i686
  60.  
  61. Uptime = 0 days 0 hrs 7 min 6 sec
  62. Avg. qps = 108
  63. Total Questions = 46268
  64. Threads Connected = 14
  65.  
  66. Warning: Server has not been running for at least 48hrs.
  67. It may not be safe to use these recommendations
  68.  
  69. To find out more information on how each of these
  70. runtime variables effects performance visit:
  71. http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
  72. Visit http://www.mysql.com/products/enterprise/advisors.html
  73. for info about MySQL's Enterprise Monitoring and Advisory Service
  74.  
  75. SLOW QUERIES
  76. The slow query log is enabled.
  77. Current long_query_time = 10.000000 sec.
  78. You have 1 out of 46291 that take longer than 10.000000 sec. to complete
  79. Your long_query_time seems to be fine
  80.  
  81. BINARY UPDATE LOG
  82. The binary update log is NOT enabled.
  83. You will not be able to do point in time recovery
  84. See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html
  85.  
  86. WORKER THREADS
  87. Current thread_cache_size = 16
  88. Current threads_cached = 12
  89. Current threads_per_sec = 0
  90. Historic threads_per_sec = 0
  91. Your thread_cache_size is fine
  92.  
  93. MAX CONNECTIONS
  94. Current max_connections = 100
  95. Current threads_connected = 15
  96. Historic max_used_connections = 40
  97. The number of used connections is 40% of the configured maximum.
  98. Your max_connections variable seems to be fine.
  99.  
  100. INNODB STATUS
  101. Current InnoDB index space = 592 K
  102. Current InnoDB data space = 432 K
  103. Current InnoDB buffer pool free = 99 %
  104. Current innodb_buffer_pool_size = 350 M
  105. Depending on how much space your innodb indexes take up it may be safe
  106. to increase this value to up to 2 / 3 of total system memory
  107.  
  108. MEMORY USAGE
  109. Max Memory Ever Allocated : 1017 M
  110. Configured Max Per-thread Buffers : 943 M
  111. Configured Max Global Buffers : 640 M
  112. Configured Max Memory Limit : 1.54 G
  113. Physical Memory : 2.00 G
  114. Max memory limit seem to be within acceptable norms
  115.  
  116. KEY BUFFER
  117. Current MyISAM index space = 148 M
  118. Current key_buffer_size = 256 M
  119. Key cache miss rate is 1 : 479
  120. Key buffer free ratio = 85 %
  121. Your key_buffer_size seems to be fine
  122.  
  123. QUERY CACHE
  124. Query cache is enabled
  125. Current query_cache_size = 32 M
  126. Current query_cache_used = 2 M
  127. Current query_cache_limit = 16 M
  128. Current Query cache Memory fill ratio = 8.29 %
  129. Current query_cache_min_res_unit = 4 K
  130. Your query_cache_size seems to be too high.
  131. Perhaps you can use these resources elsewhere
  132. MySQL won't cache query results that are larger than query_cache_limit in size
  133.  
  134. SORT OPERATIONS
  135. Current sort_buffer_size = 4 M
  136. Current read_rnd_buffer_size = 256 K
  137. Sort buffer seems to be fine
  138.  
  139. JOINS
  140. Current join_buffer_size = 1.00 M
  141. You have had 375 queries where a join could not use an index properly
  142. You have had 2 joins without keys that check for key usage after each row
  143. You should enable "log-queries-not-using-indexes"
  144. Then look for non indexed joins in the slow query log.
  145. If you are unable to optimize your queries you may want to increase your
  146. join_buffer_size to accommodate larger joins in one pass.
  147.  
  148. Note! This script will still suggest raising the join_buffer_size when
  149. ANY joins not using indexes are found.
  150.  
  151. OPEN FILES LIMIT
  152. Current open_files_limit = 8302 files
  153. The open_files_limit should typically be set to at least 2x-3x
  154. that of table_cache if you have heavy MyISAM usage.
  155. Your open_files_limit value seems to be fine
  156.  
  157. TABLE CACHE
  158. Current table_open_cache = 4096 tables
  159. Current table_definition_cache = 1024 tables
  160. You have a total of 987 tables
  161. You have 1036 open tables.
  162. The table_cache value seems to be fine
  163.  
  164. TEMP TABLES
  165. Current max_heap_table_size = 64 M
  166. Current tmp_table_size = 64 M
  167. Of 966 temp tables, 7% were created on disk
  168. Created disk tmp tables ratio seems fine
  169.  
  170. TABLE SCANS
  171. Current read_buffer_size = 4 M
  172. Current table scan ratio = 60739 : 1
  173. read_buffer_size seems to be fine
  174.  
  175. TABLE LOCKING
  176. Current Lock Wait ratio = 1 : 74
  177. You may benefit from selective use of InnoDB.
  178. If you have long running SELECT's against MyISAM tables and perform
  179. frequent updates consider setting 'low_priority_updates=1'
  180. If you have a high concurrency of inserts on Dynamic row-length tables
  181. consider setting 'concurrent_insert=2'.
  182.  
  183. root@pasta [~]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement