You are here
Sammlung von Newsfeeds
Migration between MySQL/Percona Server and MariaDB
This week we did some migrations from MariaDB 10.0 to Percona Server 5.6 at the IT department of a big German bank.
We were perfectly aware that since version 10.0 the MariaDB code base started to diverge slightly away from the MySQL and Percona Server code base which are still pretty close to each other.
Because of the Percona Server option enforce_storage_engine we wanted to do this migration.
We stopped the MariaDB 10.0 server replaced the binaries by the Percona Server 5.6 binaries and started the Percona 5.6 server again. After successfully starting the instance we found some error messages in the MySQL error log. By running the mysql_upgrade command some of the problems were fixed but not all of them. Still left problems were:
- The MariaDB binary logs provoked some error messages for the Percona Server: [ERROR] Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 25, event_type: -93 [Warning] Error reading GTIDs from binary log: -1 [ERROR] Incorrect definition of table mysql.db: expected column 'User' at position 2 to have type char(16), found type char(80). [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type char(77), found type char(141). [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set... A purge of the binary logs solved this issue.
- The tables mysql.event, mysql.innodb_table_stats and mysql.innodb_index_stats where not fixed by mysql_upgrade (a bug to fix for Percona and MySQL/Oracle?). We had to replace those tables manually by copying from an other already working Percona 5.6 Server.
Later in the FromDual technology labs we investigated further and tried the other way from Percona Server 5.6 to MariaDB 10.0. In this direction we found some other errors in the MySQL error log which also where not completely resolved by the mysql_upgrade utility:
- The mysql.innodb_table_stats and mysql.innodb_index_stats tables where recreated manually (here a bug to fix for the MariaDB people?).
- All error messages from tables affected by the following message: InnoDB: in InnoDB data dictionary has unknown flags 40/50/52. could be silenced by a run of the OPTIMIZE TABLE command (which can become quite expensive for very big tables).
Sidegrades from MySQL 5.6 to Percona Server 5.6 and back did not provoke any error message written to the MySQL log files. Sidegrades from MariaDB 10.0 to MySQL 5.6 and vice versa behaved exactly the same as MariaDB 10.0 to Percona Server 5.6 and back.
from/to: MySQL 5.6 MariaDB 10.0 Percona Server 5.6 MySQL 5.6 - 2 tables, OPTIMIZE OK MariaDB 10.0 binlog, 3 tables - binlog, 3 tables Percona Server 5.6 OK 2 tables, OPTIMIZE -During our tests we got rid of the error messages. If they caused any technical harm to the tables or the data we cannot say so far. Further testing and experience from real life is needed. Any feedback is welcome!
ObservationsIt looks like MariaDB 10.0 understands MySQL/Percona Server replication but not the other way around. So replication from MariaDB 10.0 to MySQL 5.6 does probably not work (different implementation of GTID)?
RecommendationTo make sure a sigdegrade between these 3 MySQL branches/forks is seamlessly possible the best method seems to be to dump/restore (NOT xtrabackup!) the data. This can be an issue with huge databases (hundreds of Gbyte).
Further aidAlso have a look at our MySQL compatibility matrix and our MySQL upgrade check-list.
If you need any help to convert MySQL to MariaDB to Percona Server or the other way do not hesitate to contact the FromDual consultancy team. We will be pleased to assist you as a neutral and vendor independent consulting company.
MySQL Environment MyEnv 1.1.1 has been released
FromDual has the pleasure to announce the release of the new version 1.1.1 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.
The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.
You can download MyEnv from here.
In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.
Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.
Upgrade from 1.1.0 to 1.1.1 # cd ${HOME}/product # tar xf /download/myenv-1.1.1.tar.gz # rm -f myenv # ln -s myenv-1.1.1 myenvIf you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Upgrade from 1.0.5 to 1.1.1 # cd ${HOME}/product # tar xf /download/myenv-1.1.1.tar.gz # rm -f myenv # ln -s myenv-1.1.1 myenv
If you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Replace the following files:
- cp ${HOME}/product/myenv/etc/variables.conf.template /etc/myenv/variables.conf
- cp ${HOME}/product/myenv/bin/myenv.server /etc/init.d/myenv
- Function to check upgrade requirements to v1.1 implemented.
- none
- none
- End tag added to mysql_bman code in certain places where it was missing.
- innodbackup bug fixed, pigz bug fixed.
- Warning message more verbose explaining solution in case of missing xtrabackup binaries.
- pigz as alternative compression mechanism implemented.
- Log mysqldump error to stderr.
- my_exec replaces exec/system calls.
- Return code exits fixed.
- Cleanup date is formated nicer and cleanup bug is fixed.
- copy_preserve introduced to preserve timestamp and archive code cleaned up.
- Retention time can be 0 or any value out of h, d, w, m.
- Binary log begin and end ts is written to log file.
- Catalog DB handle was sometimes called without a catalog (ugly bug introduced in v1.1.0!).
MySQL Environment MyEnv 1.1.1 has been released
FromDual has the pleasure to announce the release of the new version 1.1.1 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.
The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.
You can download MyEnv from here.
In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.
Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.
Upgrade from 1.1.0 to 1.1.1 # cd ${HOME}/product # tar xf /download/myenv-1.1.1.tar.gz # rm -f myenv # ln -s myenv-1.1.1 myenvIf you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Upgrade from 1.0.5 to 1.1.1 # cd ${HOME}/product # tar xf /download/myenv-1.1.1.tar.gz # rm -f myenv # ln -s myenv-1.1.1 myenv
If you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Replace the following files:
- cp ${HOME}/product/myenv/etc/variables.conf.template /etc/myenv/variables.conf
- cp ${HOME}/product/myenv/bin/myenv.server /etc/init.d/myenv
- Function to check upgrade requirements to v1.1 implemented.
- none
- none
- End tag added to mysql_bman code in certain places where it was missing.
- innodbackup bug fixed, pigz bug fixed.
- Warning message more verbose explaining solution in case of missing xtrabackup binaries.
- pigz as alternative compression mechanism implemented.
- Log mysqldump error to stderr.
- my_exec replaces exec/system calls.
- Return code exits fixed.
- Cleanup date is formated nicer and cleanup bug is fixed.
- copy_preserve introduced to preserve timestamp and archive code cleaned up.
- Retention time can be 0 or any value out of h, d, w, m.
- Binary log begin and end ts is written to log file.
- Catalog DB handle was sometimes called without a catalog (ugly bug introduced in v1.1.0!).
MySQL Environment MyEnv 1.1.1 has been released
FromDual has the pleasure to announce the release of the new version 1.1.1 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.
The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.
You can download MyEnv from here.
In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.
Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.
Upgrade from 1.1.0 to 1.1.1 # cd ${HOME}/product # tar xf /download/myenv-1.1.1.tar.gz # rm -f myenv # ln -s myenv-1.1.1 myenvIf you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Upgrade from 1.0.5 to 1.1.1 # cd ${HOME}/product # tar xf /download/myenv-1.1.1.tar.gz # rm -f myenv # ln -s myenv-1.1.1 myenv
If you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Replace the following files:
- cp ${HOME}/product/myenv/etc/variables.conf.template /etc/myenv/variables.conf
- cp ${HOME}/product/myenv/bin/myenv.server /etc/init.d/myenv
- Function to check upgrade requirements to v1.1 implemented.
- none
- none
- End tag added to mysql_bman code in certain places where it was missing.
- innodbackup bug fixed, pigz bug fixed.
- Warning message more verbose explaining solution in case of missing xtrabackup binaries.
- pigz as alternative compression mechanism implemented.
- Log mysqldump error to stderr.
- my_exec replaces exec/system calls.
- Return code exits fixed.
- Cleanup date is formated nicer and cleanup bug is fixed.
- copy_preserve introduced to preserve timestamp and archive code cleaned up.
- Retention time can be 0 or any value out of h, d, w, m.
- Binary log begin and end ts is written to log file.
- Catalog DB handle was sometimes called without a catalog (ugly bug introduced in v1.1.0!).
MySQL Environment MyEnv 1.1.0 has been released
FromDual has the pleasure to announce the release of the new version 1.1.0 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.
The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.
You can download MyEnv from here.
In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.
Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.
Upgrade from 1.0.5 to 1.1.0 # cd ${HOME}/product # tar xf /download/myenv-1.1.0.tar.gz # rm -f myenv # ln -s myenv-1.1.0 myenvIf you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Replace the following files:
- cp ${HOME}/product/myenv/etc/variables.conf.template /etc/myenv/variables.conf
- cp ${HOME}/product/myenv/bin/myenv.server /etc/init.d/myenv
- Error with !includedir fixed (Bug #143).
- tput is hidden in interactive mode now. No more nasty warning messages.
- Start/stop script did not pass error code correctly.
- Timezone complain on myenv_start_stop.php fixed with temporary fix.
- Init script should not through errors on SuSE any more.
- Init script is improved. Myenv should only start if network is available (runlevel).
- mysqladmin complains now if my.cnf has wrong parameters and does not show the schema down any more.
- MYSQL_HOME was changed from basedir to datadir, consider this for upgrade, this is a significant change, impact is not clear!
- Under some circumstances up did not show all schemata, fixed.
- No changes.
- NUMA maps script from Jeremy Cole added.
- block_galera_node.sh fixed for more than 1 back-end.
- For many backup types cleanup, archive and compress functionality added.
- Schema backup per-schema writes log pos now to log file and catalog.
- Binlog policy added.
- Backup structure is not created any more for cleanup and catalog operations.
- Binlog backup should work now with and without default location.
- Passing strange characters in password is handled more robust now.
- Schema names more robust with back-ticks.
- memory-table-check bug fixed.
- Command line is displayed in output (without exposing password).
- Cleanup of archivedir is possible now.
- Backup for configuration file implemented.
- Physical backup based on xtrabackup/mysqlbackup implemented.
- All exit's replaced by returns. Proper error handling should be possible.
- Backup logging implemented.
- Password from command line is not exposed any more to log file. Back-port from v1.0.5.
- Per schema privilege backup implemented.
- Catalog creation and catalog upgrade integrated.
MySQL Environment MyEnv 1.1.0 has been released
FromDual has the pleasure to announce the release of the new version 1.1.0 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.
The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.
You can download MyEnv from here.
In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.
Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.
Upgrade from 1.0.5 to 1.1.0 # cd ${HOME}/product # tar xf /download/myenv-1.1.0.tar.gz # rm -f myenv # ln -s myenv-1.1.0 myenvIf you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Replace the following files:
- cp ${HOME}/product/myenv/etc/variables.conf.template /etc/myenv/variables.conf
- cp ${HOME}/product/myenv/bin/myenv.server /etc/init.d/myenv
- Error with !includedir fixed (Bug #143).
- tput is hidden in interactive mode now. No more nasty warning messages.
- Start/stop script did not pass error code correctly.
- Timezone complain on myenv_start_stop.php fixed with temporary fix.
- Init script should not through errors on SuSE any more.
- Init script is improved. Myenv should only start if network is available (runlevel).
- mysqladmin complains now if my.cnf has wrong parameters and does not show the schema down any more.
- MYSQL_HOME was changed from basedir to datadir, consider this for upgrade, this is a significant change, impact is not clear!
- Under some circumstances up did not show all schemata, fixed.
- No changes.
- NUMA maps script from Jeremy Cole added.
- block_galera_node.sh fixed for more than 1 back-end.
- For many backup types cleanup, archive and compress functionality added.
- Schema backup per-schema writes log pos now to log file and catalog.
- Binlog policy added.
- Backup structure is not created any more for cleanup and catalog operations.
- Binlog backup should work now with and without default location.
- Passing strange characters in password is handled more robust now.
- Schema names more robust with back-ticks.
- memory-table-check bug fixed.
- Command line is displayed in output (without exposing password).
- Cleanup of archivedir is possible now.
- Backup for configuration file implemented.
- Physical backup based on xtrabackup/mysqlbackup implemented.
- All exit's replaced by returns. Proper error handling should be possible.
- Backup logging implemented.
- Password from command line is not exposed any more to log file. Back-port from v1.0.5.
- Per schema privilege backup implemented.
- Catalog creation and catalog upgrade integrated.
MySQL Environment MyEnv 1.1.0 has been released
FromDual has the pleasure to announce the release of the new version 1.1.0 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.
The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.
You can download MyEnv from here.
In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.
Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.
Upgrade from 1.0.5 to 1.1.0 # cd ${HOME}/product # tar xf /download/myenv-1.1.0.tar.gz # rm -f myenv # ln -s myenv-1.1.0 myenvIf you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:
cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/Replace the following files:
- cp ${HOME}/product/myenv/etc/variables.conf.template /etc/myenv/variables.conf
- cp ${HOME}/product/myenv/bin/myenv.server /etc/init.d/myenv
- Error with !includedir fixed (Bug #143).
- tput is hidden in interactive mode now. No more nasty warning messages.
- Start/stop script did not pass error code correctly.
- Timezone complain on myenv_start_stop.php fixed with temporary fix.
- Init script should not through errors on SuSE any more.
- Init script is improved. Myenv should only start if network is available (runlevel).
- mysqladmin complains now if my.cnf has wrong parameters and does not show the schema down any more.
- MYSQL_HOME was changed from basedir to datadir, consider this for upgrade, this is a significant change, impact is not clear!
- Under some circumstances up did not show all schemata, fixed.
- No changes.
- NUMA maps script from Jeremy Cole added.
- block_galera_node.sh fixed for more than 1 back-end.
- For many backup types cleanup, archive and compress functionality added.
- Schema backup per-schema writes log pos now to log file and catalog.
- Binlog policy added.
- Backup structure is not created any more for cleanup and catalog operations.
- Binlog backup should work now with and without default location.
- Passing strange characters in password is handled more robust now.
- Schema names more robust with back-ticks.
- memory-table-check bug fixed.
- Command line is displayed in output (without exposing password).
- Cleanup of archivedir is possible now.
- Backup for configuration file implemented.
- Physical backup based on xtrabackup/mysqlbackup implemented.
- All exit's replaced by returns. Proper error handling should be possible.
- Backup logging implemented.
- Password from command line is not exposed any more to log file. Back-port from v1.0.5.
- Per schema privilege backup implemented.
- Catalog creation and catalog upgrade integrated.
Galera Cluster VS PXC VS MariaDB Galera Cluster - Benchmarking
It is not clear for many MySQL users that Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster depend on the same Galera library i.e used in Galera Cluster for MySQL which is provided by Codership team:
- Galera Cluster: MySQL Server (by Oracle) + Galera library.
- Percona XtraDB Cluster: Percona Server + Galera library.
- MariaDB Galera Cluster: MariaDB Server + Galera library.
But the question is, are there any performance differences between the three of them ?
Let's discover that by doing some simple benchmark to test MySQL write performance in Galera Cluster, PXC and MariaDB Galera Cluster installations.
System Information: HW configurations (AWS Servers): Nodes Servers HW configurations:- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (# of cores 8, # of threads 16, HT enabled).
- Memory: 16GB RAM.
- Storage: HDD 120GB/ 5400RPM.
- CPU: Intel(R) Xeon(R) CPU E5-2651 v2 @ 1.80GHz (# of cores 4, # of threads 8, HT enabled).
- Memory: 16GB RAM.
- Storage: HDD 10GB/ 5400RPM.
- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (# of cores 16, # of threads 32, HT enabled).
- Memory: 32GB RAM.
- Storage: HDD 10GB/ 5400RPM.
- OS : Red Hat Enterprise Linux Server release 6.5 (Santiago)
- Sysbench : 0.5.3
- GLB : 1.0.0
- Galera Cluster : 5.5.34 and 5.6.16
- Percona XtraDB Cluster : 5.5.37 and 5.6.19
- MariaDB Galera Cluster : 5.5.38 and 10.0.12
- Galera Library : 3.5
- The testing environment consists of 5 AWS servers, three servers for a three-node cluster (each node is installed on a single server), one server for the load balancer and the final server for the load generator in which sysbench is installed to send requests to the load balancer from.
- Sysbench command: sysbench --num-threads=64 --max-requests=1000 --db-driver=mysql --test=/usr/share/doc/sysbench/tests/db/oltp.lua --mysql-table-engine=InnoDB --mysql-user=dev --mysql-password='test' --mysql-host=load_balancer_ip run .
- Table structure which was used by sysbench tests: mysql> show create table sbtest.sbtest\G CREATE TABLE `sbtest` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `k` int(10) unsigned NOT NULL DEFAULT '0', `c` char(120) NOT NULL DEFAULT '', `pad` char(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `k` (`k`) ) ENGINE=InnoDB AUTO_INCREMENT=8574 DEFAULT CHARSET=latin1
- The my.cnf used is something like: [mysqld] key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 innodb_buffer_pool_size = 8G innodb_flush_log_at_trx_commit = 0 expire_logs_days = 10 max_binlog_size = 100M server-id = 1 log-bin = mysql-bin binlog_format = ROW auto_increment_increment = 3 auto_increment_offset = 1 log_slave_updates default_storage_engine = InnoDB # Path to Galera library wsrep_provider = /usr/lib64/galera/libgalera_smm.so # Cluster connection URL contains the IPs of node#1, node#2 and node#3 wsrep_cluster_address = gcomm://nodeB-IP,nodeC-IP innodb_autoinc_lock_mode = 2 # Node #1 address wsrep_node_address = nodeA-IP # Cluster name wsrep_cluster_name = test_cluster # SST method wsrep_sst_method = rsync # Authentication for SST method wsrep_sst_auth = "sst:password"
Notes:
- The number of threads used in this test is 64 as it generated the highest throughput on all cluster installations.
- Each throughput value for each test case is generated by the average of ten (10) times execution.
The raw results in Transactions / Sec might be useful:
sync_binlog=0innodb_flush_log_ at_trx_commitGalera Cluster 5.5.34PXC 5.5.37MariaDB Galera Cluster 5.5.38Galera Cluster 5.6.16PXC 5.6.15MariaDB Galera Cluster 10.0.120525.119534.022534.249519.575532.19520.7361125.615131.748341.384157.001162.783174.972526.761528.858524.039511.817526.06521.024sync_binlog=10242.201249.622262.516220.313229.807220.97196.82996.759148.815111.995114.8113.0562224.476210.904217.142209.139201.596214.311
Conclusion
According to the above results:
- innodb_flush_log_at_trx_commit = 1 significantly slows down Galera.
- sync_binlog also cuts in half the throughput.
- All other are more or less equal in throughput.
Galera Cluster VS PXC VS MariaDB Galera Cluster - Benchmarking
It is not clear for many MySQL users that Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster depend on the same Galera library i.e used in Galera Cluster for MySQL which is provided by Codership team:
- Galera Cluster: MySQL Server (by Oracle) + Galera library.
- Percona XtraDB Cluster: Percona Server + Galera library.
- MariaDB Galera Cluster: MariaDB Server + Galera library.
But the question is, are there any performance differences between the three of them ?
Let's discover that by doing some simple benchmark to test MySQL write performance in Galera Cluster, PXC and MariaDB Galera Cluster installations.
System Information: HW configurations (AWS Servers): Nodes Servers HW configurations:- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (# of cores 8, # of threads 16, HT enabled).
- Memory: 16GB RAM.
- Storage: HDD 120GB/ 5400RPM.
- CPU: Intel(R) Xeon(R) CPU E5-2651 v2 @ 1.80GHz (# of cores 4, # of threads 8, HT enabled).
- Memory: 16GB RAM.
- Storage: HDD 10GB/ 5400RPM.
- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (# of cores 16, # of threads 32, HT enabled).
- Memory: 32GB RAM.
- Storage: HDD 10GB/ 5400RPM.
- OS : Red Hat Enterprise Linux Server release 6.5 (Santiago)
- Sysbench : 0.5.3
- GLB : 1.0.0
- Galera Cluster : 5.5.34 and 5.6.16
- Percona XtraDB Cluster : 5.5.37 and 5.6.19
- MariaDB Galera Cluster : 5.5.38 and 10.0.12
- Galera Library : 3.5
- The testing environment consists of 5 AWS servers, three servers for a three-node cluster (each node is installed on a single server), one server for the load balancer and the final server for the load generator in which sysbench is installed to send requests to the load balancer from.
- Sysbench command: sysbench --num-threads=64 --max-requests=1000 --db-driver=mysql --test=/usr/share/doc/sysbench/tests/db/oltp.lua --mysql-table-engine=InnoDB --mysql-user=dev --mysql-password='test' --mysql-host=load_balancer_ip run .
- Table structure which was used by sysbench tests: mysql> show create table sbtest.sbtest\G CREATE TABLE `sbtest` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `k` int(10) unsigned NOT NULL DEFAULT '0', `c` char(120) NOT NULL DEFAULT '', `pad` char(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `k` (`k`) ) ENGINE=InnoDB AUTO_INCREMENT=8574 DEFAULT CHARSET=latin1
- The my.cnf used is something like: [mysqld] key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 innodb_buffer_pool_size = 8G innodb_flush_log_at_trx_commit = 0 expire_logs_days = 10 max_binlog_size = 100M server-id = 1 log-bin = mysql-bin binlog_format = ROW auto_increment_increment = 3 auto_increment_offset = 1 log_slave_updates default_storage_engine = InnoDB # Path to Galera library wsrep_provider = /usr/lib64/galera/libgalera_smm.so # Cluster connection URL contains the IPs of node#1, node#2 and node#3 wsrep_cluster_address = gcomm://nodeB-IP,nodeC-IP innodb_autoinc_lock_mode = 2 # Node #1 address wsrep_node_address = nodeA-IP # Cluster name wsrep_cluster_name = test_cluster # SST method wsrep_sst_method = rsync # Authentication for SST method wsrep_sst_auth = "sst:password"
Notes:
- The number of threads used in this test is 64 as it generated the highest throughput on all cluster installations.
- Each throughput value for each test case is generated by the average of ten (10) times execution.
The raw results in Transactions / Sec might be useful:
sync_binlog=0innodb_flush_log_ at_trx_commitGalera Cluster 5.5.34PXC 5.5.37MariaDB Galera Cluster 5.5.38Galera Cluster 5.6.16PXC 5.6.15MariaDB Galera Cluster 10.0.120525.119534.022534.249519.575532.19520.7361125.615131.748341.384157.001162.783174.972526.761528.858524.039511.817526.06521.024sync_binlog=10242.201249.622262.516220.313229.807220.97196.82996.759148.815111.995114.8113.0562224.476210.904217.142209.139201.596214.311
Conclusion
According to the above results:
- innodb_flush_log_at_trx_commit = 1 significantly slows down Galera.
- sync_binlog also cuts in half the throughput.
- All other are more or less equal in throughput.
Galera Cluster VS PXC VS MariaDB Galera Cluster - Benchmarking
It is not clear for many MySQL users that Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster depend on the same Galera library i.e used in Galera Cluster for MySQL which is provided by Codership team:
- Galera Cluster: MySQL Server (by Oracle) + Galera library.
- Percona XtraDB Cluster: Percona Server + Galera library.
- MariaDB Galera Cluster: MariaDB Server + Galera library.
But the question is, are there any performance differences between the three of them ?
Let's discover that by doing some simple benchmark to test MySQL write performance in Galera Cluster, PXC and MariaDB Galera Cluster installations.
System Information: HW configurations (AWS Servers): Nodes Servers HW configurations:- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (# of cores 8, # of threads 16, HT enabled).
- Memory: 16GB RAM.
- Storage: HDD 120GB/ 5400RPM.
- CPU: Intel(R) Xeon(R) CPU E5-2651 v2 @ 1.80GHz (# of cores 4, # of threads 8, HT enabled).
- Memory: 16GB RAM.
- Storage: HDD 10GB/ 5400RPM.
- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (# of cores 16, # of threads 32, HT enabled).
- Memory: 32GB RAM.
- Storage: HDD 10GB/ 5400RPM.
- OS : Red Hat Enterprise Linux Server release 6.5 (Santiago)
- Sysbench : 0.5.3
- GLB : 1.0.0
- Galera Cluster : 5.5.34 and 5.6.16
- Percona XtraDB Cluster : 5.5.37 and 5.6.19
- MariaDB Galera Cluster : 5.5.38 and 10.0.12
- Galera Library : 3.5
- The testing environment consists of 5 AWS servers, three servers for a three-node cluster (each node is installed on a single server), one server for the load balancer and the final server for the load generator in which sysbench is installed to send requests to the load balancer from.
- Sysbench command: sysbench --num-threads=64 --max-requests=1000 --db-driver=mysql --test=/usr/share/doc/sysbench/tests/db/oltp.lua --mysql-table-engine=InnoDB --mysql-user=dev --mysql-password='test' --mysql-host=load_balancer_ip run .
- Table structure which was used by sysbench tests: mysql> show create table sbtest.sbtest\G CREATE TABLE `sbtest` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `k` int(10) unsigned NOT NULL DEFAULT '0', `c` char(120) NOT NULL DEFAULT '', `pad` char(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `k` (`k`) ) ENGINE=InnoDB AUTO_INCREMENT=8574 DEFAULT CHARSET=latin1
- The my.cnf used is something like: [mysqld] key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 innodb_buffer_pool_size = 8G innodb_flush_log_at_trx_commit = 0 expire_logs_days = 10 max_binlog_size = 100M server-id = 1 log-bin = mysql-bin binlog_format = ROW auto_increment_increment = 3 auto_increment_offset = 1 log_slave_updates default_storage_engine = InnoDB # Path to Galera library wsrep_provider = /usr/lib64/galera/libgalera_smm.so # Cluster connection URL contains the IPs of node#1, node#2 and node#3 wsrep_cluster_address = gcomm://nodeB-IP,nodeC-IP innodb_autoinc_lock_mode = 2 # Node #1 address wsrep_node_address = nodeA-IP # Cluster name wsrep_cluster_name = test_cluster # SST method wsrep_sst_method = rsync # Authentication for SST method wsrep_sst_auth = "sst:password"
Notes:
- The number of threads used in this test is 64 as it generated the highest throughput on all cluster installations.
- Each throughput value for each test case is generated by the average of ten (10) times execution.
The raw results in Transactions / Sec might be useful:
sync_binlog=0innodb_flush_log_ at_trx_commitGalera Cluster 5.5.34PXC 5.5.37MariaDB Galera Cluster 5.5.38Galera Cluster 5.6.16PXC 5.6.15MariaDB Galera Cluster 10.0.120525.119534.022534.249519.575532.19520.7361125.615131.748341.384157.001162.783174.972526.761528.858524.039511.817526.06521.024sync_binlog=10242.201249.622262.516220.313229.807220.97196.82996.759148.815111.995114.8113.0562224.476210.904217.142209.139201.596214.311
Conclusion
According to the above results:
- innodb_flush_log_at_trx_commit = 1 significantly slows down Galera.
- sync_binlog also cuts in half the throughput.
- All other are more or less equal in throughput.
FromDual invites MySQL community to company meeting 2014 in Barcelona
FromDual holds its annual company meeting this year in Barcelona, Spain.
We are pleased to invite everybody interested in MySQL technologies (MySQL, Galera Cluster, FromDual Tools, Percona Cluster, MariaDB, etc.) to participate on Thursday evening September 11 at the HCC MONTBLANC, Via Laietana 61, to meet, exchange ideas and discuss MySQL related topics.
The event starts at 18:00, we will meet in the hotel lobby. The planned schedule is:
- How to Implement GTID Replication in MySQL 5.6 (25') and 5' Questions and Answers.
- MySQL backup/restore for anonymized exports (25') and 5' Questions and Answers.
- Break 15 min
- Quick presentation (15') of YOUR project or company.
- Quick presentation (15') of YOUR project or company.
- Break 15 min
- Quick presentation (15') of YOUR project or company.
- Quick presentation (15') of YOUR project or company.
Please feel free to send us your suggestion about your presentation. Any technical or non-technical MySQL related topic is welcome. For example how you use MySQL in your company or special problems you have faced and solved (or not solved yet), research work you have done on MySQL products, business cases you solve with MySQL products, evaluations or experience you have made, etc. For the proposal please send us a mail.
Please also send us a short notice if you plan to participate or join us with MeetUp.
This gives us the possibility to arrange and organize all the infrastructure with the Hotel.
The event is free of costs for all participants.
We are pleased if you can make it to the event,
Your FromDual Team
FromDual invites MySQL community to company meeting 2014 in Barcelona
FromDual holds its annual company meeting this year in Barcelona, Spain.
We are pleased to invite everybody interested in MySQL technologies (MySQL, Galera Cluster, FromDual Tools, Percona Cluster, MariaDB, etc.) to participate on Thursday evening September 11 at the HCC MONTBLANC, Via Laietana 61, to meet, exchange ideas and discuss MySQL related topics.
The event starts at 18:00, we will meet in the hotel lobby. The planned schedule is:
- How to Implement GTID Replication in MySQL 5.6 (25') and 5' Questions and Answers.
- MySQL backup/restore for anonymized exports (25') and 5' Questions and Answers.
- Break 15 min
- Quick presentation (15') of YOUR project or company.
- Quick presentation (15') of YOUR project or company.
- Break 15 min
- Quick presentation (15') of YOUR project or company.
- Quick presentation (15') of YOUR project or company.
Please feel free to send us your suggestion about your presentation. Any technical or non-technical MySQL related topic is welcome. For example how you use MySQL in your company or special problems you have faced and solved (or not solved yet), research work you have done on MySQL products, business cases you solve with MySQL products, evaluations or experience you have made, etc. For the proposal please send us a mail.
Please also send us a short notice if you plan to participate or join us with MeetUp.
This gives us the possibility to arrange and organize all the infrastructure with the Hotel.
The event is free of costs for all participants.
We are pleased if you can make it to the event,
Your FromDual Team
FromDual invites MySQL community to company meeting 2014 in Barcelona
FromDual holds its annual company meeting this year in Barcelona, Spain.
We are pleased to invite everybody interested in MySQL technologies (MySQL, Galera Cluster, FromDual Tools, Percona Cluster, MariaDB, etc.) to participate on Thursday evening September 11 at the HCC MONTBLANC, Via Laietana 61, to meet, exchange ideas and discuss MySQL related topics.
The event starts at 18:00, we will meet in the hotel lobby. The planned schedule is:
- How to Implement GTID Replication in MySQL 5.6 (25') and 5' Questions and Answers.
- MySQL backup/restore for anonymized exports (25') and 5' Questions and Answers.
- Break 15 min
- Quick presentation (15') of YOUR project or company.
- Quick presentation (15') of YOUR project or company.
- Break 15 min
- Quick presentation (15') of YOUR project or company.
- Quick presentation (15') of YOUR project or company.
Please feel free to send us your suggestion about your presentation. Any technical or non-technical MySQL related topic is welcome. For example how you use MySQL in your company or special problems you have faced and solved (or not solved yet), research work you have done on MySQL products, business cases you solve with MySQL products, evaluations or experience you have made, etc. For the proposal please send us a mail.
Please also send us a short notice if you plan to participate or join us with MeetUp.
This gives us the possibility to arrange and organize all the infrastructure with the Hotel.
The event is free of costs for all participants.
We are pleased if you can make it to the event,
Your FromDual Team