Yahoo's MySQL Performance analyzer detailed

Source: Internet
Author: User
Tags java web

Yahoo's MySQL Performance Analyzer detailed Chszs, reprint needs to be noted. Blog Home: Http://blog.csdn.net/chszs Introduction

Yahoo! was open source its own MySQL Performance Analyzer (MySQL Performance Analyzer), the source 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 specifies that JDK 8 should be used in the Pom.xml configuration, the source code does not use the language features of JDK 8, so modifying this pom.xml to JDK 7 will build and run properly. that the

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

Change into

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

At present, Yahoo Open source MySQL Performance Analyzer does not include visual output, address: Https://github.com/yahoo/mysql_perf_analyzer

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

The build process defaults to creating a file named Myperfserver-server.zip under Directory Perfjettyserver/target. To build it, execute the command at the top-level directory:

mvn clean package
Ii. installation and usage of MySQL Performance analyzer

1, according to the Myperfserver-server.zip file generated earlier, unzip it.

2, by default, this performance Analyzer will also store the test data in MySQL. So 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 to be able to have all the permissions for this database
Note that if you do not use MySQL, the built-in Derby database will be used.

3. Check the script start_myperf.sh to see if you need to adjust.
The port number may often be modified
-j:jettyhome
-p:http port, using 9092 ports by default
-w:war, this must be Myperf.war.
-k:working directory, working directory, if not specified, will use the./work Directory
-c:url Context,url Context, default is/myperf
Also pay attention to modifying the path of the Java command line.

4. Start

# ./start_myperf.h

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

5. Close

# ./stop_myperf.sh

6. First Launch and Login
Browser Access Http://your_host:9092/myperf
The initial user name and password are: 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 scanner
Click the Start Scanner button
Note that each time you modify the configuration, you need to restart the scanner.
If the scanner does not work as expected, restart the analyzer:

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

For each database that you want to monitor, you need to create a MySQL user and assign the following permissions:
1) Process Permissions
2) Replication Client permissions
3) Show Databases permissions
4) Show View permissions
5) All permissions for the SELECT statement

8, the analyzer relies on Linux SNMP to collect the OS underlying data, it is necessary to check the status of the SNMPD service to see if it starts.

Third, the matters needing attention

There are two points to be aware of,
1. SNMPD Linux-based specifications
2, the mail notification uses the Linux MAILX command

Yahoo's MySQL Performance analyzer detailed

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.