Hallo Joe,
ich hoffe du kannst mir helfen. Ich habe auf unserem Server HP Proliant G7 48GB, eine neue openvz (Speicher 10GB) mit debian 8 mit ispconfig3, postfix, dovecot, fail2ban etc., rondcube, mysql 5.5.47 in der vz läuft im Moment ispconfig 3 als serververwaltung, roundcube (webmail) und als Test ein JTL 4 Testshop so weit so gut.
Ich habe deine my.cnf als Grundlage benutzt und an debian angepasst und die replikation weggelassen (währe gut wenn du auch eine my.cnf ohne Replikation online stellen würdest).
Mein Problem laut mysqltuner sehr viele - Aborted connections, kann jemand helfen an was liegt es wie kann ich das beheben?
Hier mal meine my.cnf und die Ausgabe von mysqltuner - Danke euch in voraus für die Hilfe.
my.cnf:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
#
http://dev.mysql.com/doc/mysql/en/serve ... ables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysql]
prompt = \u@\h [\d]>\_
no_auto_rehash
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
#tmpdir = /tmp
tmpdir = /var/tmp/mysql
lc-messages-dir = /usr/share/mysql
#explicit_defaults_for_timestamp
skip-external-locking
skip-symbolic-links
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
back_log = 300
safe-user-create = 1
delay-key-write = ALL
#low_priority_updates =1
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer_size = 256M
join_buffer_size = 128k
sort_buffer_size = 2M
read_buffer_size = 128K
read_rnd_buffer_size = 256K
bulk_insert_buffer_size = 8M
myisam_sort_buffer_size = 8M
performance_schema = OFF
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options = FORCE,BACKUP
max_connections = 100
ft_max_word_len = 20
ft_min_word_len = 3
max_heap_table_size = 64M
tmp_table_size = 64M
max_allowed_packet = 64M
open_files_limit = 32768
table_open_cache = 8192
table_definition_cache = 8192
thread_concurrency = 4
thread_cache_size = 80
thread_stack = 192K
#
# * Query Cache Configuration
#
query_cache_type = 1
query_cache_size = 128M
query_cache_limit = 2M
query_cache_min_res_unit = 4K
#
# * 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 log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 0.9
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
#net_retry_count = 16384
#
# * InnoDB
innodb_thread_concurrency = 8
innodb_buffer_pool_size = 2G
innodb_buffer_pool_instances = 2
innodb_data_home_dir = /var/lib/mysql
innodb_log_group_home_dir = /var/lib/mysql
innodb_data_file_path = ibdata1:1000M;ibdata2:1000M;ibdata3:10M:autoextend
innodb_flush_method = O_DIRECT
innodb_log_file_size = 256M
innodb_log_buffer_size = 16M
innodb_log_files_in_group = 2
innodb_flush_log_at_trx_commit = 1
innodb_max_dirty_pages_pct = 90
innodb_file_per_table = 1
innodb_purge_threads = 1
innodb_strict_mode = 1
innodb_old_blocks_time = 1000
innodb_stats_on_metadata = 0
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_io_capacity = 200
innodb_open_files = 8192
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * 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]
max_allowed_packet = 256M
key_buffer_size = 256M
quote_names
quick
[isamchk]
key_buffer_size = 256M
[myisamchk]
key_buffer_size = 256M
[mysqlhotcopy]
interactive_timeout
#
# * 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/
----> mysqltuner:
[OK] Logged in using credentials from debian maintenance account.
>> MySQLTuner 1.6.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
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.46-0+deb8u1-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in InnoDB tables: 576K (Tables: 19)
[--] Data in MyISAM tables: 6M (Tables: 381)
[!!] Total fragmented tables: 4
-------- Security Recommendations -------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[!!] There is no basic password file list !
-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 11h 41m 4s (177K q [1.381 qps], 9K conn, TX: 121M, RX: 75M)
[--] Reads / Writes: 22% / 78%
[--] Binary logging is disabled
[--] Total buffers: 2.5G global + 2.7M per thread (100 max threads)
[OK] Maximum reached memory usage: 2.5G (25.13% of installed RAM)
[OK] Maximum possible memory usage: 2.7G (27.23% of installed RAM)
[OK] Slow queries: 1% (2K/177K)
[OK] Highest usage of available connections: 20% (20/100)
[!!] Aborted connections: 26.81% (2650/9886)
[OK] Query cache efficiency: 92.6% (118K cached / 128K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
[OK] Temporary tables created on disk: 6% (90 on disk / 1K total)
[OK] Thread cache hit rate: 99% (20 created / 9K connections)
[OK] Table cache hit rate: 80% (426 open / 528 opened)
[OK] Open file limit used: 2% (775/32K)
[OK] Table locks acquired immediately: 100% (50K immediate / 50K locks)
-------- MyISAM Metrics -----------------------------------------------------
[!!] Key buffer used: 18.5% (49M used / 268M cache)
[OK] Key buffer size / total MyISAM indexes: 256.0M/3.2M
[OK] Read Key buffer hit rate: 99.9% (344K cached / 267 reads)
[OK] Write Key buffer hit rate: 100.0% (140K cached / 37 writes)
-------- InnoDB Metrics -----------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB buffer pool / data size: 2.0G/576.0K
[OK] InnoDB buffer pool instances: 2
[!!] InnoDB Used buffer: 0.22% (289 used/ 131071 total)
[OK] InnoDB Read buffer efficiency: 91.02% (2839 hits/ 3119 total)
[!!] InnoDB Write buffer efficiency: 0.00% (0 hits/ 1 total)
[OK] InnoDB log waits: 0.00% (0 waits / 11 writes)
-------- AriaDB Metrics -----------------------------------------------------
[--] AriaDB is disabled.
-------- Replication Metrics -------------------------------------------------
[--] No replication slave(s) for this server.
[--] This is a standalone server..
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Reduce or eliminate unclosed connections and network issues
Gruss
micha