Entertainment TPC Testing

Source: Internet
Author: User
Tags percona
Testing TPC is a serious task. It is just for entertainment. Don't confuse it with the TPC Committee's high-end reports. 1. First find a less standard TPC-C testing tool seems PerconaMySQL this thing is used more people: bazaar.launchpad.net ~ Percona-devperconatoolstpcc-mysql simple

Testing TPC is a serious task. It is just for entertainment. Don't confuse it with the TPC Committee's high-end reports. 1. First to find a less standard TPC-C testing tool seems to Percona MySQL this thing used more people: http://bazaar.launchpad.net /~ Percona-dev/perconatools/tpcc-mysql/simple

Testing TPC is a serious task. It is just for entertainment. Don't confuse it with the TPC Committee's high-end reports.

1. First find a less standard TPC-C Testing Tool

It seems that this thing of Percona MySQL is used more people: http://bazaar.launchpad.net /~ Percona-dev/perconatools/tpcc-mysql/has a simple look at the implementation. The gap between this and the standard is still large, for example, there is no pause between transactions, that is to say, there is no thinking time, and the tested tpmC value will be inflated.

The basic test steps are common, regardless of TPC or SPECfs. Probably there will be: a) Prepare the environment B) load data c) Start running d) generate a report

Of course, it is not easy to run once. To analyze the problems encountered, some data, such as statistics on CPU, memory, network, and IO, should be recorded during the running process.

2. Familiar with tools

README in the source code directory must be viewed carefully. If you are idle, you can also look at the code.

Since it is to test the TPC-C, there must be some table creation statements, this need to take a closer look. For example:

Create_table. SQL add_fkey_idx. SQL

The table should have at least the master code and external code constraints specified by the standard. A test without constraints is a rogue.

3. Before the test is officially started, you need to simulate your hands and make all the mistakes you have made.

Compile the test program $ cd src; make;

Create a database. Assume that the database name is tpcc. $ mysqladmin -- no-defaults-S/home/mysql/run/mysql. sock-u root create tpcc.

Create a table $ mysql -- no-defaults-S/home/mysql/run/mysql. sock-u root tpcc <create_table. SQL

Load data. Assume that 10 warehouses are loaded. $./tpcc_load 127.0.0.1: 3306 tpcc root "" 10

If the machine is almost the same, it may take an hour. Smoking a cigarette is definitely not enough. Go out for a meal. Since it is so slow, there must be a faster way than this. For example, use the parallel loading mode: $./load. sh tpcc 10

Append an external code constraint $ mysql -- no-defaults-S/home/mysql/run/mysql. sock-u root tpcc <add_fkey_idx. SQL

As mentioned above, the unrestricted test is ...... Executing data after data loading helps reduce the data loading time. Smoke again.

Run test $. /tpcc_start-h 127.0.0.1-P 3306-d tpcc-u root-w 10-c 5-r 5-l 300 5 connections, push for 5 seconds, run for 300 seconds, that is, 5 minutes. A look is the entertainment version. This does not provide any good indicators. For example, a) the amount of data is too small. B) The number of connections is too small. c) It takes hundreds of seconds to run ......

Clean up the environment (delete the database) $ mysqladmin -- no-defaults-S/home/mysql/run/mysql. sock-u root drop tpcc

After running, a report is printed, and the last line is similar:

10.200 TpmC

Poor!

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.