Şöyle 2 raporum var.
ilgilenen olursa yazayım:
[root@localhost ~]# ./tuning-primer.sh
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 5.0.77 i686
Uptime = 9 days 3 hrs 22 min 35 sec
Avg. qps = 117
Total Questions = 92831398
Threads Connected = 2
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.0/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 = 10 sec.
You have 908 out of 92831426 that take longer than 10 sec. to complete
Your long_query_time seems to be fine
BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See
http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html
WORKER THREADS
Current thread_cache_size = 4
Current threads_cached = 3
Current threads_per_sec = 2
Historic threads_per_sec = 1
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size
MAX CONNECTIONS
Current max_connections = 170
Current threads_connected = 3
Historic max_used_connections = 162
The number of used connections is 95% of the configured maximum.
You should raise max_connections
INNODB STATUS
Current InnoDB index space = 1 M
Current InnoDB data space = 2 M
Current InnoDB buffer pool free = 40 %
Current innodb_buffer_pool_size = 8 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 : 462 M
Configured Max Per-thread Buffers : 456 M
Configured Max Global Buffers : 26 M
Configured Max Memory Limit : 483 M
Physical Memory : 3.46 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 827 M
Current key_buffer_size = 7 M
Key cache miss rate is 1 : 181
Key buffer free ratio = 36 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
QUERY CACHE
Query cache is enabled
Current query_cache_size = 9 M
Current query_cache_used = 6 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 73.98 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 132.00 K
You have had 5729 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.
Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.
OPEN FILES LIMIT
Current open_files_limit = 1604 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_cache value = 712 tables
You have a total of 1188 tables
You have 712 open tables.
Current table_cache hit rate is 1%
, while 100% of your table cache is in use
You should probably increase your table_cache
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 2296731 temp tables, 11% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 160 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 236
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=2'.
[root@localhost ~]#
[root@localhost ~]# perl mysqltuner.pl
>> MySQLTuner 1.2.0 - Major Hayden <
[email protected]>
>> Bug reports, feature requests, and downloads at
http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.77
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive +BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 2G (Tables: 1032)
[--] Data in InnoDB tables: 2M (Tables: 133)
[--] Data in MEMORY tables: 378K (Tables: 6)
[!!] BDB is enabled but isn't being used
[!!] Total fragmented tables: 86
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 9d 3h 23m 51s (92M q [117.550 qps], 8M conn, TX: 2B, RX: 1B)
[--] Reads / Writes: 75% / 25%
[--] Total buffers: 43.0M global + 2.7M per thread (170 max threads)
[OK] Maximum possible memory usage: 499.9M (14% of installed RAM)
[OK] Slow queries: 0% (908/92M)
[!!] Highest connection usage: 95% (162/170)
[OK] Key buffer size / total MyISAM indexes: 8.0M/827.0M
[OK] Key buffer hit rate: 99.4% (13B cached / 72M reads)
[OK] Query cache efficiency: 52.0% (27M cached / 52M selects)
[!!] Query cache prunes per day: 876567
[OK] Sorts requiring temporary tables: 0% (844 temp sorts / 10M sorts)
[!!] Joins performed without indexes: 5729
[OK] Temporary tables created on disk: 11% (293K on disk / 2M total)
[OK] Thread cache hit rate: 89% (863K created / 8M connections)
[!!] Table cache hit rate: 1% (712 open / 69K opened)
[OK] Open file limit used: 70% (1K/1K)
[OK] Table locks acquired immediately: 99% (66M immediate / 67M locks)
[OK] InnoDB data size / buffer pool: 2.2M/8.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Add skip-bdb to MySQL configuration to disable BDB
Run OPTIMIZE TABLE to defragment tables for better performance
Enable the slow query log to troubleshoot bad queries
Reduce or eliminate persistent connections to reduce connection usage
Adjust your join queries to always utilize indexes
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
max_connections (> 170)
wait_timeout (< 14400)
interactive_timeout (< 14400)
query_cache_size (> 9M)
join_buffer_size (> 128.0K, or always use indexes with joins)
table_cache (> 712)
[root@localhost ~]#
ram-> 4gb cpu-> 6
my.cnf dosyam:
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_allowed_packet=32M
max_connections=170
wait_timeout = 14400
interactive_timeout = 14400
query_cache_size = 9M
thread_cache_size = 4
table_cache = 712
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
my.cnf dosyamı nasıl değiştirirsem bir kat daha olumlu sonuç elde edebilirim?