Tcpcopy, a good helper for simulating online MySQL stress testing

Source: Internet
Author: User
Tags svn root access

The main information is from: http://code.google.com/p/tcpcopy/

Tcpcopy is a low-level application request replication (all TCP-based packets) open source projects that can be used to replace AB for an on-line simulated stress test that forwards various online requests to the test server for more detailed near-real testing, thus avoiding new business, Potential problems with the system on-line.

Four functions of Tcpcopy:

1) Distributed stress testing that centralizes multiple previous requests to a backend for stress testing
2) Pre-launch test, check new system reliability, identify potential problems ahead of time
3) comparison test, the same request, for different or different versions of the program, you can do performance comparisons and other tests
4) Apply hot backup, low request loss rate for short connections to backend (1/100,000)

The Tcpcopy has several features:

1) Real-time forwarding
2) near-real effect
3) minimal impact on on-line systems
4) Simple operation
5) distributed
6) The meaning is extraordinary

Using Tcpcopy is very simple, download the source code, compile, follow the instructions, a few steps will soon be able to use.

Some notes about the use of tcpcopy are:

1) Linux platform, kernel 2.6+
2) Tcpcopy is similar to UDP, so it drops packets and then loses the request
3) The system does not support domain name, only support IP address
4) Local requests, set the LO MTU to not exceed 1500, and do not set the 127.0.0.1 address in the configuration file.
To set intranet or extranet addresses
5) tcpcopy server may become a performance bottleneck
6) Lost request rate is related to network condition, preferably in-network replication request
7) Tcpcopy and interception programs in tcpcopy require root access
8) The tcpcopy is only related to the IP, TCP layer data, and if the request authentication is related to the protocol above the TCP layer, the system will not function properly.
For example, the MySQL connection protocol, because the authorization authentication and the TCP layer above the MySQL protocol, so the copy of the past request will be the target
The standard test server considers the illegal request, this time needs the MySQL protocol to make the specific processing, the TCPCOPY program can run normally
9) Program update very fast, so the latest version on SVN
SVN checkouthttp://tcpcopy.googlecode.com/svn/trunk/tcpcopy
10) The current pursuit is function, performance optimization and code refactoring will be done after stable
11) long response current support is not very good and will be improved in the next release
12) If there is a problem, please note the error message in the Error.log file (email:[email protected])
13) Source code has been transferred to GitHub

In addition to these, here are some of the summaries I used to test MySQL with tcpcopy:
1) test MySQL, the test machine needs to open skip-grant-tables, otherwise it will not work, because MySQL needs to be certified; Online server does not need to be adjusted
2) The flush privileges cannot be performed during the test, otherwise the above options will be invalidated
3) Each time you enable tcpcopy, you need to restart the mysqld, can not be directly applied online, otherwise you can not forward the package (the latest version has resolved this issue)
4) in the test process with Sysbench, the online server can create a test table when prepare, the test machine cannot create a new table
5) need to properly adjust the kernel parameters: Ip_queue_maxlen, otherwise there will be a lot of queue dropped
6) can not fully guarantee the online server and test machine data consistency, can only be used as an analog line pressure, early bug testing and other uses

2012-02-15 Update: tcpcopy-mysql-alpha-v0.7.tar.gz The version has been tested for a long time and has been formally stable and reliable for use in the for MySQL environment.


--------------------------------------Split Line--------------------------------------

Hall of Understanding ( http://zhishuedu.com Training is a professional quality training brand jointly launched by senior MySQL expert Ye Jinlong and Wu Bingxi, which mainly includes MySQL DBA combat optimization and Python Operation Development Course, which is the most conscientious and quality training course in the industry.


This article is from the "Lao Ye teahouse" blog, please be sure to keep this source http://imysql.blog.51cto.com/1540006/1879725

Tcpcopy, a good helper for simulating online MySQL stress testing

Related Article

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.