Erbitte Hilfe bei MySQL Tuning

Memphis2k5

New Member
Hallo und guten Tag,

ich würde mich hier gerne mal anschließen. Ich habe den Eindruck das mit meiner Konfiguration die ich selbst nach lesen diverse Seiten / Foren erstellt das eine oder andere nicht stimmt oder ich die Infos falsch interpretiert habe. Leider habe ich kein Backup der my.cnf merh verfügbar so wie sie war. Ich fand da lief das System ein ticken besser, trotz vieler fehler von den tuning scripts

Server-Info:
CPU: E3-1245v2
RAM: 32G
SoftRaid 3x120GB SSD
OS: Debian 7 + Plesk 12

Auf dem Server laufen 2 mittlere Foren und 2-3 kleine Webseiten.

Hier nun meine aktuelle my.cnf
[mysqld]
local-infile=0
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 50
table_open_cache = 15000
table_definition_cache = 15000
max_heap_table_size = 512M
tmp_table_size = 512M
key_buffer_size = 384M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
join_buffer_size = 2M
#
# * Query Cache Configuration
#
query_cache_limit = 16M
query_cache_size = 256M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size = 768M
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

Asuwertung von tuning-primer.sh
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.5.40-0+wheezy1 x86_64

Uptime = 0 days 13 hrs 43 min 29 sec
Avg. qps = 17
Total Questions = 864730
Threads Connected = 3

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.5/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.000000 sec.
You have 0 out of 864751 that take longer than 10.000000 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.5/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 4
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 4
Historic max_used_connections = 10
The number of used connections is 20% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 76 M
Current InnoDB data space = 388 M
Current InnoDB buffer pool free = 7 %
Current innodb_buffer_pool_size = 768 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 : 1.52 G
Configured Max Per-thread Buffers : 709 M
Configured Max Global Buffers : 1.39 G
Configured Max Memory Limit : 2.08 G
Physical Memory : 31.31 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 39 M
Current key_buffer_size = 384 M
Key cache miss rate is 1 : 336
Key buffer free ratio = 80 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 256 M
Current query_cache_used = 122 M
Current query_cache_limit = 16 M
Current Query cache Memory fill ratio = 48.00 %
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 = 8 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 97 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 = 30060 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_open_cache = 15000 tables
Current table_definition_cache = 15000 tables
You have a total of 964 tables
You have 1346 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 512 M
Current tmp_table_size = 512 M
Of 6648 temp tables, 41% were created on disk
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 2 M
Current table scan ratio = 33 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 37508
Your table locking seems to be fine

Asuwertung von mysqltuner
>> MySQLTuner 1.1.1 - Major Hayden <major@mhtx.net>
>> 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.5.40-0+wheezy1
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 43M (Tables: 63)
[--] Data in InnoDB tables: 388M (Tables: 853)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in MEMORY tables: 7M (Tables: 7)
[!!] Total fragmented tables: 858

-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 13h 44m 48s (865K q [17.487 qps], 31K conn, TX: 7B, RX: 265M)
[--] Reads / Writes: 57% / 43%
[--] Total buffers: 1.9G global + 14.2M per thread (50 max threads)
[OK] Maximum possible memory usage: 2.6G (8% of installed RAM)
[OK] Slow queries: 0% (0/865K)
[OK] Highest usage of available connections: 20% (10/50)
[OK] Key buffer size / total MyISAM indexes: 384.0M/39.5M
[OK] Key buffer hit rate: 99.7% (14M cached / 43K reads)
[OK] Query cache efficiency: 78.3% (513K cached / 655K selects)
[!!] Query cache prunes per day: 541
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 6K sorts)
[!!] Temporary tables created on disk: 41% (4K on disk / 11K total)
[OK] Thread cache hit rate: 99% (12 created / 31K connections)
[!!] Table cache hit rate: 13% (1K open / 9K opened)
[OK] Open file limit used: 0% (198/30K)
[OK] Table locks acquired immediately: 99% (337K immediate / 337K locks)
[OK] InnoDB data size / buffer pool: 388.1M/768.0M

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
Increasing the query_cache size over 128M may reduce performance
Temporary table size is already large - reduce result set size
Reduce your SELECT DISTINCT queries without LIMIT clauses
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
query_cache_size (> 256M) [see warning above]
table_cache (> 15000)
 
Back
Top