Compare mysql5.1.50 mysql5.5.8

  • 848 views
Uploaded on

Compare Innodb performance mysql5.1.50 mysql5.5.8

Compare Innodb performance mysql5.1.50 mysql5.5.8

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
848
On Slideshare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Compare mysql5.1.50 with mysql5.5.8 Philip zhong 2011-1-5
  • 2. Prepare the testing environment
  • 3. 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
  • 4. Install MYSQL5.1.50export 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
  • 5. 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
  • 6. Install SYSBENCH0.4.12./configure --prefix=/opt/sysbench_mysql50/ -- with-mysql- includes=/home/oracle/mysql5.1.50/include/mys ql/ --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/
  • 7. MYSQL5.1.50 plug-in configurationsdefault-storage-engine = INNODBignore-builtin-innodbplugin- load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_p lugin.so;innodb_lock_waits=ha_innodb_plugin.so;innodb_cmp=ha_innodb_plugin.so;innodb_cm p_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=h a_innodb_plugin.soinnodb_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
  • 8. MYSQL5.1.50 built-in 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_max_dirty_pages_pct = 70transaction-isolation = READ-COMMITTED
  • 9. 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
  • 10. Test without concurrency for mysql5.1.50 and mysql5.5.8
  • 11. MYSQL without concurrencyitem name Mysql5.1.50 built-in Mysql5.1.50 plug-in Mysql5.5.8Insert with 53.19 sec 53.33 sec 1 min 1.00 sec10000000recordsAdd a column 1000000 rows affected 1000000 rows 1000000 rows (13.00 sec) affected (12.03 sec) affected (12.47sec)Create a index 1000000 rows affected 0 rows affected 0 rows affected (19.24 sec) (16.38 sec) (18.51 sec)Drop a index 1000000 rows affected 0 rows affected 0 rows affected (0.46 (13.50 sec) (0.46 sec) sec)Drop a column 1000000 rows affected 1000000 rows 1000000 rows (20.00 sec) affected (19.04 sec) affected (19.78 sec)
  • 12. Create the tables scriptCREATE 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;
  • 13. 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();
  • 14. DDL operation scripts1.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 ;
  • 15. Test with concurrency for mysql5.1.50 and mysql5.5.8
  • 16. MYSQL with concurrency
  • 17. 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
  • 18. 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
  • 19. 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