Detailed analysis and testing of SSD performance issues in MySQL servers

Detailed analysis and testing of SSD performance issues in MySQL servers

【question】

We have an HP server. When the SSD writes IOPS of about 5000, the %util reaches more than 80%. So is there any problem with the performance of this SSD? To solve this problem, we conducted the following test.

【tool】

Blktrace is a tool used to troubleshoot IO performance under Linux. It can record the various steps that IO goes through and calculate the consumption of IO requests at each stage. The following are some key steps:

Q2G – The time consumed to generate IO requests, including remap and split time;

G2I – The time it takes for an IO request to enter the IO Scheduler, including the merge time;

I2D – The time the IO request waits in the IO Scheduler;

D2C – the time the IO request takes to complete between the driver and the hardware;

Q2C – The time consumed by the entire IO request (G2I + I2D + D2C = Q2C), which is equivalent to the wait in iostat.

D2C can be used as an indicator of hardware performance, and I2D can be used as an indicator of IO Scheduler performance.

[Test 1: Comparison of SSD write performance before and after HP SSD Smart Path is enabled]

1. HP SSD Smart Path is enabled, SSD controller Caching is disabled, Cache Ratio: 100% Read / 0% Write

The test results are as follows, focusing on the AVG value of D2C (the time consumed by IO requests on the SSD), which is about 0.217ms

2. HP SSD Smart Path is off, SSD controller Caching is on, Cache Ratio: 10% Read / 90% Write

The test results are as follows, focusing on the AVG value of D2C (the time consumed by IO requests on the SSD), which is about 0.0906ms

【in conclusion】

The former takes about 2.4 times longer on hardware than the latter. For write-based systems, it is recommended to disable HP SSD Smart Path and enable SSD controller caching.

[Test 2: Comparison of the performance of noop and deadline I/O scheduling algorithms]

Currently, there are four disk scheduling algorithms: the one in our system is configured as deadline, and many documents recommend that SSD be configured as noop.

1. Anticipatory, suitable for personal PC, single disk system;

2. CFQ (Complete Fair Queuing), the default IO scheduling algorithm, a completely fair queuing scheduling algorithm

3. Deadline: Schedule in each IO queue according to the deadline

4. noop, simple FIFO queue scheduling

The following tests were conducted with HP SSD Smart Path disabled.

1. Deadline, mainly focusing on G2I and I2D

2. Change to noop

【in conclusion】

The noop IO Scheduler performs slightly better than deadline in terms of waiting and consumption time, but the difference is not that big. If evaluation is required, further detailed testing in various scenarios is required.

The following figure is a test comparison of different scheduling algorithms based on online data:

[Test 3: Compare the time consumed by this server SSD with that of an SSD with the same configuration]

AVG D2C is 0.0906ms and 0.0934ms, with little difference, indicating that the SSD of this server is normal in terms of response time.

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of MySQL instance with SSD storage enabled
  • MySQL performance optimization best 20 experience sharing
  • In-depth analysis of MySQL database engine introduction, differences, creation and performance testing
  • MYSQL performance optimization sharing (sharding of databases and tables)
  • MySQL performance optimization road --- modify the configuration file my.cnf
  • MySQL Performance Settings
  • Tips to significantly improve MySQL query performance
  • MySQL performance optimization index optimization

<<:  CentOS6.8 Chinese/English environment switching tutorial diagram

>>:  Vue must learn knowledge points: the use of forEach()

Recommend

Vue Router loads different components according to background data

Table of contents Requirements encountered in act...

Practical record of handling MySQL automatic shutdown problems

I recently helped someone with a project and the ...

JavaScript canvas realizes the effect of nine-square grid cutting

This article shares the specific code of canvas t...

How to elegantly implement WeChat authorized login in Vue3 project

Table of contents Preface Prepare Implementation ...

Simple implementation of Mysql add, delete, modify and query statements

Simple implementation of Mysql add, delete, modif...

CentOS 7.x deployment of master and slave DNS servers

1. Preparation Example: Two machines: 192.168.219...

Native JavaScript to achieve the effect of carousel

This article shares the specific code for JavaScr...

Detailed explanation of the use of Vue3 state management

Table of contents background Provide / Inject Ext...

Nginx tp3.2.3 404 problem solution

Recently I changed Apache to nginx. When I moved ...

How to find slow SQL statements in MySQL

How to find slow SQL statements in MySQL? This ma...

Detailed tutorial on installing JDK1.8 on Linux

1. Cleaning before installation rpm -qa | grep jd...

Summary of several key points about mysql init_connect

The role of init_connect init_connect is usually ...

...