I’m evaluating Percona XtraDB cluster in our Test environment (Amazon EC2 with 2 Small instances). Installation went easily but only problem seems to be that even under light utilization mysqld process size grows all the time without releasing the memory. I’m not familiar in debugging Mysql memory usage, so please advice if I need to provide some additional information.
OS: Centos 6.3
With following packages installed:
Percona-Server-shared-51-5.1.66-rel14.1.495.rhel6.x86_64
percona-release-0.0-1.x86_64
percona-xtrabackup-2.0.3-470.rhel6.x86_64
Percona-XtraDB-Cluster-client-5.5.27-23.6.356.rhel6.x86_64
Percona-XtraDB-Cluster-server-5.5.27-23.6.356.rhel6.x86_64
Updated Galera to the latest available:
galera-23.2.2-1.rhel5.x86_64
mysql> show status like ‘wsrep_provider%’;±-----------------------±----------------------------------+| Variable_name | Value |±-----------------------±----------------------------------+| wsrep_provider_name | Galera || wsrep_provider_vendor | Codership Oy <info@codership.com> || wsrep_provider_version | 23.2.2(r137) |±-----------------------±----------------------------------+
my.cnf:
[mysqld_safe]
wsrep_urls=gcomm://10.0.0.101:4567,gcomm://10.0.0.102:4567,gcomm://
[mysqld]
datadir=/var/lib/mysql/mysql_data
user=mysql
log_slave_updates = 1
binlog_format=ROW
max_allowed_packet = 200M
default_storage_engine=InnoDB
#wsrep_provider=/usr/lib64/libgalera_smm.so
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_slave_threads=2
wsrep_cluster_name=mycluster
wsrep_sst_method=xtrabackup
wsrep_sst_auth=root:
wsrep_node_name=test-web01
innodb_locks_unsafe_for_binlog=1
innodb_autoinc_lock_mode=2
innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 4M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 1
Here’s some tests I have done:
after starting Mysql top -command shows following:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND14103 mysql 20 0 1165m 84m 7268 S 0.0 5.1 0:00.31 mysqld
Mysql Status:
mysql> status;--------------mysql Ver 14.14 Distrib 5.5.27, for Linux (x86_64) using readline 5.1Connection id: 4Current database:Current user: root@localhostSSL: Not in useCurrent pager: stdoutUsing outfile: ''Using delimiter: ;Server version: 5.5.27 Percona XtraDB Cluster (GPL), wsrep_23.6.r356Protocol version: 10Connection: Localhost via UNIX socketServer characterset: latin1Db characterset: latin1Client characterset: utf8Conn. characterset: utf8UNIX socket: /var/lib/mysql/mysql.sockUptime: 22 secThreads: 4 Questions: 12 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.545--------------
After some random queries (used our Mysql based application):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND15505 mysql 20 0 1559m 657m 135m S 0.0 39.7 1:46.74 mysqld
mysql> status;--------------mysql Ver 14.14 Distrib 5.5.27, for Linux (x86_64) using readline 5.1Connection id: 258Current database:Current user: root@localhostSSL: Not in useCurrent pager: stdoutUsing outfile: ''Using delimiter: ;Server version: 5.5.27 Percona XtraDB Cluster (GPL), wsrep_23.6.r356Protocol version: 10Connection: Localhost via UNIX socketServer characterset: latin1Db characterset: latin1Client characterset: utf8Conn. characterset: utf8UNIX socket: /var/lib/mysql/mysql.sockUptime: 11 min 0 secThreads: 4 Questions: 62190 Slow queries: 0 Opens: 64 Flush tables: 1 Open tables: 57 Queries per second avg: 94.227--------------
Running Flush tables doesen’t release memory at all. Anyone else having these issue ? Or is there some misconfiguration ? Any help greatly appreciated.