Our Blogs

LinkedIn MySQL Query Analyzer Tool Improves Productivity

September 25, 2017
LinkedIn MySQL Query Analyzer Tool Improves Productivity
LinkedIn has released a Query Analyzer tool to optimize the performance of the MySQL instances. The main aim of the tool is to tune and analyze the expensive metrics. The MySQL Query Analyzer Tool not only provides a UI to enable users to analyze metrics but also runs on the network layer. Moreover, the data collected with the tool are stored in a centralized server.

LinkedIn has adopted a multitenant MySQL architecture to deal with over 500+ applications running based on the tool. Even if a single tenency occurs, it will cost huge resource costs. The problem here is that queries from one application can determine the fate and performance of other apps. Hence, it is vital to optimize the applications to the maximum extent.

The LinkedIn MySQL Query Analyzer Tool consists of agent, centralized server and User Interface. The purpose of the agent is to fetch metrics about running queries and subsequent performance. Moreover, it will run on the MySQL nodes. The server is the location where all the data related to queries are stored for reporting purposes. Meanwhile, the UI generates a friendly interface for the purpose of data analysis.

According to Karthik Apigatla, senior database engineer at LinkedIn, the MySQL Query Analyzer Tool identifies problematic queries at a single glance. It analyzed the weekly activity of the queries and also troubleshoots database related slowdowns.

Apigatla disclosed that the agent not only captures raw query packets but also reconstructs the query with the help of MySQL protocols. It will then calculate response times based on the time difference related to packet generation. The agent keeps track of when the packets entered the port and first developed by the response generated via the database.

With the help of the UI, you can view distinct queries for hosts and also enables the user to filter by various time intervals. You can also select individual queries including the ability to provide graphs and parameters such as average time and load.

The MySQL Query Analyzer Tool developed by LinkedIn compares the queries to find out which one resulted in the largest percentage of load. The tool is designed to improve the productivity of the database developers and also to create efficient applications, which utilize the database functions properly.