Xtradb+haproxy high-Availability DB cluster (iii) SYSBENCH performance test Chapter

Source: Internet
Author: User
Tags lua prepare haproxy

XTRADB sysbench Performance Test

Install sysbench, the latest version is 0.5

Yum Install Sysbench-y

Initializing the test table
Sysbench--test=/usr/share/doc/sysbench/tests/db/oltp.lua--oltp-table-size=1000000--mysql-table-engine=innodb-- Mysql-user=sysbench--mysql-password=sysbench--mysql-port=3306--mysql-host=10.0.37.123--mysql-db=test Prepare

Parameter description:

--oltp-table-size     Specifies the size of the table, which is the number of rows in the table

--mysql-table-engine myisam innodb heap ndbcluster bdb maria falcon pbxt

--mysql-db : Specifies the database in which to create the test table, which defaults to the sbtest Library, which needs to be created in advance.

--test : Specify Lua scripts, parameter options most of the same as the old version of --TEST=OLTP Help

--db-driver : Specify driver, default to Mysql

--myisam-max-rows : Specify Myisam of the table Max_Rows Options

--oltp-secondary       key XID (ID) replace PRIMARY KEY (ID) innodb inside the engine create a unique for each table 6

--oltp-auto-inc : set ID column auto-incrementalwith a value of on or off , the default is on

SelectTest
Sysbench--test=/usr/share/doc/sysbench/tests/db/select.lua--oltp-table-size=1000000--mysql-table-engine=innodb --mysql-user=sbtest--mysql-password=sbpass--mysql-port=3306--mysql-host=192.168.70.72--mysql-db=sbtest-- Max-requests=0--max-time=120--oltp-tables-count=1--report-interval=10--num-threads=8 Run

Parameter description:

--max-time to specify the length of the test

--oltp-tables-count Specify the number of test tables

--max-requests Specify the maximum number of requests, default 10000 , 0 is not limited

--num-threads Specify the number of threads

Prepare is a preparation process, such as measuring OLTP need to Load Data to Table

Run It's a real test process.

Cleanup is the purge process

UpdateTest
Sysbench--test=/usr/share/doc/sysbench/tests/db/update_index.lua--oltp-table-size=1000000--mysql-table-engine= InnoDB--mysql-user=sbtest--mysql-password=sbpass--mysql-port=3306--mysql-host=192.168.70.72--mysql-db=sbtest-- Max-requests=0--max-time=120--oltp-tables-count=1--report-interval=10--num_threads=8 Run

InsertTest
Sysbench--test=/usr/share/doc/sysbench/tests/db/insert.lua--oltp-table-size=1000000--mysql-table-engine=innodb --mysql-user=sbtest--mysql-password=sbpass--mysql-port=3306--mysql-host=192.168.70.72--mysql-db=sbtest-- Max-requests=0--max-time=120--oltp-tables-count=1--report-interval=10--num_threads=8 Run

Test Results
8 thread read 120s insert 120s 120s
A single 578859 76204 70780
Two units 531659 90487 91068
Three 459249 88791 81759
A single but
Haproxy
718150 76268 69842


In writing, over the Haproxy, one with more than a small gap, more than the performance of the writing has little impact.

In reading, supposedly, multiple units should be doubled performance, but from the test results, there is no change, do not know why, some people know why also please inform.



This article is from the "Yang Cloud" blog, please be sure to keep this source http://yangrong.blog.51cto.com/6945369/1684140

Xtradb+haproxy high-Availability DB cluster (iii) SYSBENCH performance test Chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.