ServerForum.org - The Professional IT Community

Full Version: KVM server with SSD to HDD RAID10 performance issues?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

After a server move from a KVM server with SSD to a Dedicated Server with RAID 10 without SSD, we have extreme fluctuations of the I / O Wait.

Forr 1-2 hours the server is running normal, but for the rest of time the performance is so slow that the website still un accessible.

I have already check the stats with iotop, only the mysql process seems to be working hard. All HDD has already been replaced with new ones but the issue is still existing.

Someone idea what to do now?
Of course, your storage is now much slower than before. In your case I would look with tools like tuning primers, whether the caching or the mysql settings can be improved. Otherwise you will probably live with the peaks or have to improve something on the application side. PHPMyADmin can also offers such a "guide" through various sub-optimal directives. You can check if certain tables can be converted into storage engines that are more powerful for your purposes. Maybee from MyIsam to InnoDB. But MyIsam is much faster as InnoDB in with select statements... 

Which disks are in the server installed, speed, model...?
I had actually thought that the new setup against a KVM server from my hoster but with HDD RAID10 instead shoulb be habe similar performance. As I know only B2C SSD were installed therefore the performance should be similar, or not?

On the new sevrer WD hard disks is installed in the server.

MYSQL config:
Code:
max_allowed_packet=100M

max_connections         = 300
thread_cache_size       = 2

max_allowed_packet      = 16M
key_buffer_size         = 128M
read_buffer_size        = 4M
read_rnd_buffer_size    = 512K
sort_buffer_size        = 2M
join_buffer_size        = 1M

query_cache_size        = 128M
query_cache_limit       = 512M
query_cache_type        = 1
#open_files_limit       = 5000
table_cache             = 12000
table_definition_cache  = 12000

max_heap_table_size     = 64M
tmp_table_size          = 64M

innodb_file_per_table   = 1
innodb_buffer_pool_size = 256M
innodb_log_buffer_size  = 4M
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[mysqld]
open_files_limit = 200000
Output mysqltuner.pl
Code:
root@srv1 ~]# perl mysqltuner.pl
>>  MySQLTuner 1.7.0 - 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.52-MariaDB
[OK] Operating on 64-bit architecture

-------- Log file Recommendations ------------------------------------------------------------------
[--] Log file: /var/log/mariadb/mariadb.log(73K)
[OK] Log file /var/log/mariadb/mariadb.log exists
[OK] Log file /var/log/mariadb/mariadb.log is readable.
[OK] Log file /var/log/mariadb/mariadb.log is not empty
[OK] Log file /var/log/mariadb/mariadb.log is smaller than 32 Mb
[!!] /var/log/mariadb/mariadb.log contains 444 warning(s).
[!!] /var/log/mariadb/mariadb.log contains 4 error(s).
[--] 9 start(s) detected in /var/log/mariadb/mariadb.log
[--] 1) 170222 13:46:29 [Note] /usr/libexec/mysqld: ready for connections.
[--] 2) 170222 13:40:14 [Note] /usr/libexec/mysqld: ready for connections.
[--] 3) 170222 11:49:24 [Note] /usr/libexec/mysqld: ready for connections.
[--] 4) 170222 11:06:50 [Note] /usr/libexec/mysqld: ready for connections.
[--] 5) 170220 17:00:46 [Note] /usr/libexec/mysqld: ready for connections.
[--] 6) 170218 18:30:48 [Note] /usr/libexec/mysqld: ready for connections.
[--] 7) 170218 14:47:25 [Note] /usr/libexec/mysqld: ready for connections.
[--] 8) 170117 13:20:10 [Note] /usr/libexec/mysqld: ready for connections.
[--] 9) 170114  7:53:07 [Note] /usr/libexec/mysqld: ready for connections.
[--] 8 shutdown(s) detected in /var/log/mariadb/mariadb.log
[--] 1) 170222 13:46:26 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 2) 170222 13:38:13 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 3) 170222 11:49:21 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 4) 170222 11:06:47 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 5) 170220 16:52:59 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 6) 170218 18:23:45 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 7) 170218 14:38:49 [Note] /usr/libexec/mysqld: Shutdown complete
[--] 8) 170117 14:15:07 [Note] /usr/libexec/mysqld: Shutdown complete

-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +Aria +BLACKHOLE +CSV +FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in MyISAM tables: 136M (Tables: 1047)
[--] Data in InnoDB tables: 1G (Tables: 5250)
[--] Data in MEMORY tables: 0B (Tables: 54)
[OK] Total fragmented tables: 0

-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[!!] User 'datenbanbtest@%' has no password set.
[!!] User 'datenbanbtest@%' hasn't specific host restriction.
[!!] There is no basic password file list!

-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 24s (444 q [18.500 qps], 20 conn, TX: 2M, RX: 122K)
[--] Reads / Writes: 94% / 6%
[--] Binary logging is disabled
[--] Physical Memory     : 31.1G
[--] Max MySQL memory    : 3.0G
[--] Other process memory: 6.0G
[--] Total buffers: 716.0M global + 7.8M per thread (300 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 754.9M (2.37% of installed RAM)
[OK] Maximum possible memory usage: 3.0G (9.57% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/444)
[OK] Highest usage of available connections: 1% (5/300)
[!!] Aborted connections: 5.00%  (1/20)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[!!] Query cache may be disabled by default due to mutex contention.
[!!] Query cache efficiency: 9.3% (36 cached / 389 selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 36 sorts)
[!!] Joins performed without indexes: 6
[!!] Temporary tables created on disk: 42% (21 on disk / 50 total)
[OK] Thread cache hit rate: 75% (5 created / 20 connections)
[OK] Table cache hit rate: 131% (108 open / 82 opened)
[OK] Open file limit used: 0% (54/10K)
[OK] Table locks acquired immediately: 100% (453 immediate / 453 locks)

-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is disabled.
[--] Memory used by P_S: 0B
[--] Sys schema isn't installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 8 thread(s).
[--] Using default value is good enough for your version (5.5.52-MariaDB)

-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.3% (24M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/16.5M
[!!] Read Key buffer hit rate: 88.5% (530 cached / 61 reads)
[!!] Write Key buffer hit rate: 0.0% (20 cached / 20 writes)

-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[!!] InnoDB buffer pool / data size: 256.0M/1.5G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (3.90625 %): 5.0M * 2/256.0M should be equal 25%
[OK] InnoDB buffer pool instances: 1
[--] InnoDB Buffer Pool Chunk Size not used or defined in your version
[!!] InnoDB Read buffer efficiency: 83.26% (38143 hits/ 45814 total)
[!!] InnoDB Write Log efficiency: 61.11% (22 hits/ 36 total)
[OK] InnoDB log waits: 0.00% (0 waits / 14 writes)

-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/1B
[!!] Aria pagecache hit rate: 93.7% (126 cached / 8 reads)

-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.

-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.

-------- RocksDB Metrics ---------------------------------------------------------------------------
[--] RocksDB is disabled.

-------- Spider Metrics ----------------------------------------------------------------------------
[--] Spider is disabled.

-------- Connect Metrics ---------------------------------------------------------------------------
[--] Connect is disabled.

-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] This is a standalone server.

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
   Control warning line(s) into /var/log/mariadb/mariadb.log file
   Control error line(s) into /var/log/mariadb/mariadb.log file
   Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'xxxxxxxxxx' = PASSWORD('secure_password'); )
   Restrict Host for user@% to user@xxxxxxxx
   MySQL started within last 24 hours - recommendations may be inaccurate
   Enable the slow query log to troubleshoot bad queries
   Reduce or eliminate unclosed connections and network issues
   Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
   Adjust your join queries to always utilize indexes
   When making adjustments, make tmp_table_size/max_heap_table_size equal
   Reduce your SELECT DISTINCT queries which have no LIMIT clause
   Performance shouldn't be activated for MySQL and MariaDB 5.5 and lower version
   Consider installing Sys schema from https://github.com/mysql/mysql-sys
Variables to adjust:
   query_cache_type (=0)
   query_cache_limit (> 512M, or use smaller result sets)
   join_buffer_size (> 1.0M, or always use indexes with joins)
   tmp_table_size (> 64M)
   max_heap_table_size (> 64M)
   performance_schema = OFF disable PFS
   innodb_buffer_pool_size (>= 1G) if possible.
   innodb_log_file_size * innodb_log_files_in_group should be equals to 1/4 of buffer pool size (=128M) if