Detailed explanation of Yahoo's MySQL Performance Analyzer, yahoomysql Analyzer

Source: Internet
Author: User

Detailed explanation of Yahoo's MySQL Performance Analyzer, yahoomysql Analyzer
Detailed explanation of Yahoo's MySQL Performance Analyzer Author: chszs, reprinted to be noted. Blog homepage: http://blog.csdn.net/chszs一、introduction

Yahoo opened its MySQL Performance Analyzer on the previous day and its source code is hosted on GitHub. This performance analyzer is built using Maven and requires JDK 8 and Maven 3.0.

This Performance Analyzer project contains two sub-projects:
1) Java Web Application Project: myperf
2) Jetty Web server project: jetty wrapper

Although the project is in pom. the xml configuration specifies that JDK 8 is used, but the source code does not use the language features of JDK 8. Therefore, modify the pom. xml, which can be built and run normally with JDK 7. That is

<source>1.8</source><target>1.8</target>

Change

<source>1.7</source><target>1.7</target>

Currently Yahoo open-source MySQL Performance Analyzer does not contain visual output, address: https://github.com/yahoo/mysql_perf_analyzer

Yahoo's Performance Analyzer project can be used for MySQL performance monitoring and analysis.

By default, a file named myperfserver-server.zip is created under the perfJettyServer/targetdirectory. To build it, run the following command in the top-level directory:

mvn clean package
Ii. Installation and usage of MySQL Performance Analyzer

1. Extract the myperfserver-server.zip file generated before the upload.

2. By default, this Performance Analyzer also stores test data in MySQL. Therefore, you need to create a database and related users for it.
1) Create a database named metrics
2) create a MySQL user named 'metrics' @ 'my _ host'
3) Assign permissions. You must have all permissions for the database.
Note: if you do not use MySQL, the built-in Derby database will be used.

3. Check the script start_myperf.sh to see if it needs to be adjusted.
Generally, the port number may be modified.
-J: jettyHome
-P: http port. port 9092 is used by default.
-W: war, which must be myperf. war
-K: working directory, working directory. If not specified, the./work directory will be used
-C: url context. The default value is/myperf.
You must also modify the Java command line path.

4. Start

# ./start_myperf.h

Check the nohup. out and log directories to see if any error logs exist.

5. Disable

# ./stop_myperf.sh

6. Start and log on for the first time
Browser access http: // your_host: 9092/myperf
Initial username and password: myperf/change
After logging in, you can see the settings page.
You can add an Email address to receive notifications.

7. After the configuration is complete, you can start the Scanner
Click Start transaction.
Note that the scanner needs to be restarted every time the configuration is modified.
If the scanner is not as expected, restart the analyzer:

# ./stop_myperf.sh# ./start_myperf.sh

For each database you want to monitor, you must create a MySQL user and assign the following permissions:
1) process permission
2) replication client Permissions
3) show databases permission
4) show view permission
5) All select statement Permissions

8. The analyzer relies on Linux SNMP to collect OS underlying data. Therefore, you need to check the status of the snmpd service to see if it is enabled.

Iii. Notes

Pay attention to the following two points,
1. snmpd is based on Linux specifications
2. The mailx command of Linux is used for email notification.

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.