MariaDB Cluster - 比其他节点慢一个节点

时间:2014-07-17 14:44:02

标签: mysql performance centos6 mariadb

我在主/主复制中有一个MariaDB群集(x3)。

每台服务器都有相同的my.cnf,资源完全相同。

但其中一个比其他两个慢2倍,我无法弄清楚为什么......

有人有线索吗?

my.cnf:

[client-server]

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


[mariadb]
log-error=/var/log/mysql.log

[mysqld]
#1. Mandatory settings: these settings are REQUIRED for proper cluster operation
query_cache_size=0
binlog_format=ROW
default_storage_engine=innodb
innodb_autoinc_lock_mode=2
# innodb_doublewrite=1 - this is the default and it should stay this way

# 2. Optional mysqld settings: your regular InnoDB tuning and such
datadir=/var/lib/mysql
innodb_buffer_pool_size=500M
innodb_flush_log_at_trx_commit=2
max_connections = 50
thread_cache_size = 10
skip-name-resolve

# 3. wsrep provider configuration: basic wsrep options
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_provider_options="gcache.size=3G"
wsrep_cluster_address="gcomm://192.168.5.1,192.168.5.2,192.168.5.3"
wsrep_cluster_name='xxx_galera'
wsrep_node_address='192.168.5.2'
wsrep_node_name='node2'
wsrep_sst_method=xtrabackup
wsrep_sst_auth=root:xxxxxxxx

# 4. additional "frequently used" wsrep settings
wsrep_slave_threads=2           #Max = 1/cpu

由于

(对不起我的英文)

更新1:

  • 我觉得它很慢,因为我有一个应用程序正在对数据库做一些请求(带负载均衡)。说到db2,它需要两倍的时间(18到26s而不是11s) 当另一个节点执行完全相同的请求时,它没问题。 当我关闭这个数据库时,没有更多问题(负载均衡中只有2个)

  • 所有数据库都有自己的存储,相同的资源和相同的连接(200 mbps)。

  • 它们是由Gandi.net托管的虚拟机,它们使用Xen。

更新2:

我刚将驱动器迁移到另一台服务器,结果相同...... 所以这不是硬件问题

0 个答案:

没有答案