+ All Categories
Home > Technology > Compare mysql5.1.50 mysql5.5.8

Compare mysql5.1.50 mysql5.5.8

Date post: 18-Dec-2014
Category:
Upload: philip-zhong
View: 842 times
Download: 0 times
Share this document with a friend
Description:
Compare Innodb performance mysql5.1.50 mysql5.5.8
20
Compare mysql5.1.50 with mysql5.5.8 Philip zhong 2011-1-5
Transcript
Page 1: Compare mysql5.1.50 mysql5.5.8

Compare mysql5.1.50 with mysql5.5.8

Philip zhong 2011-1-5

Page 2: Compare mysql5.1.50 mysql5.5.8

Prepare the testing environment

Page 3: Compare mysql5.1.50 mysql5.5.8

Machine configuration information

• Intel(R) Xeon(R) E5620 X86-64• 2 CPU x 8 Cores/CPU• Linux 2.6.9• 2.40GHz, 32 GB RAM• CentOS release 5.3• Disk:hdparm -t /dev/sdc2=212.19 MB/sec• Mysql5.1.50 and Mysql5.5.8 are installed on

the same machine

Page 4: Compare mysql5.1.50 mysql5.5.8

Install MYSQL5.1.50 export MYSQL_HOME=/home/oracle/mysql5.1.50CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3" ./configure \--prefix=$MYSQL_HOME --with-extra-charsets=latin1,gbk,utf8 \--with-plugins=partition,heap,innobase,myisam,innodb_plugin \--enable-assembler \--enable-thread-safe-client \--without-debug \--without-plugin-daemon_example \--without-plugin-ftexample \--without-plugin-archive \--without-plugin-blackhole \--without-plugin-example \--without-plugin-federated \--without-plugin-ibmdb2i \--without-plugin-ndbcluster \--with-mysqld-user=oracle \--with-server-suffix=-webex\--with-unix-socket-path=$MYSQL_HOME/run/mysql.sock

Page 5: Compare mysql5.1.50 mysql5.5.8

Install MYSQL5.5.8export MYSQL_HOME="/home/oracle/mysql5.5.8"export MYSQL_DATA_HOME="/data/mysql5.5.8/datacenter"cmake . \-DCMAKE_INSTALL_PREFIX=$MYSQL_HOME \-DINSTALL_LAYOUT=STANDALONE \-DMYSQL_DATADIR=$MYSQL_DATA_HOME \-DWITH_PARTITION_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \-DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \-DENABLE_DEBUG_SYNC=OFF \-DENABLE_DOWNLOADS=OFF \-DENABLE_DTRACE=OFF \-DENABLED_LOCAL_INFILE=OFF \-DENABLED_PROFILING=ON \-DMYSQL_MAINTAINER_MODE=OFF \-DMYSQL_UNIX_ADDR=$MYSQL_HOME/run/mysql.sock \-DMYSQL_TCP_PORT=3306 \-DWITH_COMMENT="mysql 5.5.8 on linux2.6 for webex" \-DWITH_DEBUG=OFF \-DWITH_EMBEDDED_SERVER=OFF\-DWITH_EXTRA_CHARSETS=ALL \-DWITH_UNIT_TESTS=OFF \-LH

Page 6: Compare mysql5.1.50 mysql5.5.8

Install SYSBENCH0.4.12

./configure --prefix=/opt/sysbench_mysql50/ --with-mysql-includes=/home/oracle/mysql5.1.50/include/mysql/ --with-mysql-libs=/home/oracle/mysql5.1.50/lib/mysql

./configure --prefix=/opt/sysbench_mysql55/ --with-mysql-includes=/home/oracle/mysql5.5.8/include/ --with-mysql-libs=/home/oracle/mysql5.5.8/lib/

Page 7: Compare mysql5.1.50 mysql5.5.8

MYSQL5.1.50 plug-in configurations

default-storage-engine = INNODBignore-builtin-innodbplugin-

load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plugin.so;innodb_lock_waits=ha_innodb_plugin.so;innodb_cmp=ha_innodb_plugin.so;innodb_cmp_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha_innodb_plugin.so

innodb_flush_method = O_DIRECTinnodb_file_per_table = 1innodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 15innodb_additional_mem_pool_size = 20Minnodb_buffer_pool_size = 1024Minnodb_log_buffer_size= 10Minnodb_log_file_size = 256Minnodb_log_files_in_group = 2innodb_thread_concurrency = 16innodb_write_io_threads = 8innodb_read_io_threads = 8innodb_max_dirty_pages_pct = 70transaction-isolation = READ-COMMITTEDinnodb_file_format=Barracuda

Page 8: Compare mysql5.1.50 mysql5.5.8

MYSQL5.1.50 built-in configurations

default-storage-engine = INNODBinnodb_flush_method = O_DIRECTinnodb_file_per_table = 1innodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 15innodb_additional_mem_pool_size = 20Minnodb_buffer_pool_size = 1024Minnodb_log_buffer_size= 10Minnodb_log_file_size = 256Minnodb_log_files_in_group = 2innodb_thread_concurrency = 16innodb_max_dirty_pages_pct = 70transaction-isolation = READ-COMMITTED

Page 9: Compare mysql5.1.50 mysql5.5.8

MYSQL5.5.8 configurationsdefault-storage-engine = INNODBinnodb_flush_method = O_DIRECTinnodb_file_per_table = 1innodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 15innodb_additional_mem_pool_size = 20Minnodb_buffer_pool_size = 1024Minnodb_log_buffer_size= 10Minnodb_log_file_size = 256Minnodb_log_files_in_group = 2innodb_thread_concurrency = 16innodb_write_io_threads = 8innodb_read_io_threads = 8innodb_max_dirty_pages_pct =70transaction-isolation = READ-COMMITTEDinnodb_file_format=Barracuda

Page 10: Compare mysql5.1.50 mysql5.5.8

Test without concurrency for mysql5.1.50 and mysql5.5.8

Page 11: Compare mysql5.1.50 mysql5.5.8

MYSQL without concurrency

item name Mysql5.1.50 built-in Mysql5.1.50 plug-in Mysql5.5.8

Insert with 10000000 records

53.19 sec 53.33 sec 1 min 1.00 sec

Add a column 1000000 rows affected (13.00 sec)

1000000 rows affected (12.03 sec)

1000000 rows affected (12.47sec)

Create a index 1000000 rows affected (19.24 sec)

0 rows affected (16.38 sec)

0 rows affected (18.51 sec)

Drop a index 1000000 rows affected (13.50 sec)

0 rows affected (0.46 sec)

0 rows affected (0.46 sec)

Drop a column 1000000 rows affected (20.00 sec)

1000000 rows affected (19.04 sec)

1000000 rows affected (19.78 sec)

Page 12: Compare mysql5.1.50 mysql5.5.8

Create the tables script

CREATE TABLE test_without_concurrency ( id int(10) unsigned NOT NULL, 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 DEFAULT CHARSET=utf8;

Page 13: Compare mysql5.1.50 mysql5.5.8

Insert data scriptDELIMITER //CREATE PROCEDURE insert_data_WITHOUT_CONCURRENCY()BEGIN DECLARE vCount bigint(12) DEFAULT 1; DECLARE vK bigint(12) DEFAULT 1; DECLARE vbuyerName varchar(128) DEFAULT '0bPhilip'; DECLARE vSellerName varchar(128) DEFAULT '0sPhilip'; SET AUTOCOMMIT=0; WHILE vCount<=1000000 DO INSERT INTO TEST_WITHOUT_CONCURRENCY (id,k,c,pad) VALUES(vCount,vK,vSellerName,vbuyerName); set vCount=vCount+1; IF MOD(vCount,5000)=0 THEN set vK=vK+1; set vbuyerName=concat(vCount,'bPhilip'); set vSellerName=concat(vCount,'sPhilip'); COMMIT; END IF; END WHILE; COMMIT;END;//DELIMITER ;Call insert_data_WITHOUT_CONCURRENCY();

Page 14: Compare mysql5.1.50 mysql5.5.8

DDL operation scripts

1.alter table TEST_WITHOUT_CONCURRENCY add column philip_test varchar(100);

2.Create index ind_c on TEST_WITHOUT_CONCURRENCY(c);

3.Alter table TEST_WITHOUT_CONCURRENCY drop column philip_test ;

4. Alter table TEST_WITHOUT_CONCURRENCY drop index ind_c ;

Page 15: Compare mysql5.1.50 mysql5.5.8

Test with concurrency for mysql5.1.50 and mysql5.5.8

Page 16: Compare mysql5.1.50 mysql5.5.8

MYSQL with concurrency

Page 17: Compare mysql5.1.50 mysql5.5.8

Insert data script--5.1.50(plug-in and built-in)cd /opt/sysbench_mysql50/bin./sysbench --test=oltp \ --mysql-host=10.224.56.188 \ --mysql-user=test --mysql-password=pass --mysql-port=3307 \ --oltp-table-size=1000000 --mysql-db=meetingdb --mysql-table-engine=innodb \ --oltp-table-name=test_with_concurrency --num-threads=16 prepare--5.5.8cd /opt/sysbench_mysql55/bin./sysbench --test=oltp \ --mysql-host=10.224.56.188 \ --mysql-user=test --mysql-password=pass --mysql-port=3306 \ --oltp-table-size=1000000 --mysql-db=meetingdb --mysql-table-engine=innodb \ --oltp-table-name=test_with_concurrency --num-threads=16 prepare

Page 18: Compare mysql5.1.50 mysql5.5.8

Test script(1)--5.1.50(plug-in and built-in)./sysbench --oltp-test-mode=complex --oltp-reconnect-mode=session \ --oltp-range-size=500 --oltp-point-selects=10 --oltp-simple-ranges=1 \ --oltp-sum-ranges=1 --oltp-order-ranges=1 --oltp-distinct-ranges=1 \ --oltp-index-updates=1 --oltp-non-index-updates=1 --oltp-nontrx-mode=select \ --oltp-connect-delay=1000 --oltp-user-delay-min=0 --oltp-user-delay-max=0 \ --db-ps-mode=auto --debug=off --test=oltp \ --mysql-host=10.224.56.188 --mysql-user=test --mysql-password=pass --mysql-port=3307\ --oltp-table-size=1000000 --mysql-db=meetingdb --mysql-table-engine=innodb \ --oltp-table-name=test_with_concurrency --num-threads=4 --max-requests=10000 --oltp-auto-inc=off \ --mysql-engine-trx=yes run

./sysbench --oltp-test-mode=complex --oltp-reconnect-mode=session \ --oltp-range-size=500 --oltp-point-selects=10 --oltp-simple-ranges=1 \ --oltp-sum-ranges=1 --oltp-order-ranges=1 --oltp-distinct-ranges=1 \ --oltp-index-updates=1 --oltp-non-index-updates=1 --oltp-nontrx-mode=select \ --oltp-connect-delay=1000 --oltp-user-delay-min=0 --oltp-user-delay-max=0 \ --db-ps-mode=auto --debug=off --test=oltp \ --mysql-host=10.224.56.188 --mysql-user=test --mysql-password=pass --mysql-port=3307\ --oltp-table-size=1000000 --mysql-db=meetingdb --mysql-table-engine=innodb \ --oltp-table-name=test_with_concurrency --num-threads=8 --max-requests=10000 --oltp-auto-inc=off \ --mysql-engine-trx=yes run

Page 19: Compare mysql5.1.50 mysql5.5.8

Test script(2)--5.5.8./sysbench --oltp-test-mode=complex --oltp-reconnect-mode=session \ --oltp-range-size=500 --oltp-point-selects=10 --oltp-simple-ranges=1 \ --oltp-sum-ranges=1 --oltp-order-ranges=1 --oltp-distinct-ranges=1 \ --oltp-index-updates=1 --oltp-non-index-updates=1 --oltp-nontrx-mode=select \ --oltp-connect-delay=1000 --oltp-user-delay-min=0 --oltp-user-delay-max=0 \ --db-ps-mode=auto --debug=off --test=oltp \ --mysql-host=10.224.56.188 --mysql-user=test --mysql-password=pass --mysql-port=3306\ --oltp-table-size=1000000 --mysql-db=meetingdb --mysql-table-engine=innodb \ --oltp-table-name=test_with_concurrency --num-threads=4 --max-requests=10000 --oltp-auto-inc=off \ --mysql-engine-trx=yes run

./sysbench --oltp-test-mode=complex --oltp-reconnect-mode=session \ --oltp-range-size=500 --oltp-point-selects=10 --oltp-simple-ranges=1 \ --oltp-sum-ranges=1 --oltp-order-ranges=1 --oltp-distinct-ranges=1 \ --oltp-index-updates=1 --oltp-non-index-updates=1 --oltp-nontrx-mode=select \ --oltp-connect-delay=1000 --oltp-user-delay-min=0 --oltp-user-delay-max=0 \ --db-ps-mode=auto --debug=off --test=oltp \ --mysql-host=10.224.56.188 --mysql-user=test --mysql-password=pass --mysql-port=3306\ --oltp-table-size=1000000 --mysql-db=meetingdb --mysql-table-engine=innodb \ --oltp-table-name=test_with_concurrency --num-threads=8 --max-requests=10000 --oltp-auto-inc=off \ --mysql-engine-trx=yes run

Page 20: Compare mysql5.1.50 mysql5.5.8

Recommended