2

I understand the double-write-buffer enhances the reliability of data, so it makes transactions slower. But it is amazing that the slow down is such severe in the newest Samsung 980 pro (M.2 PCIe 4.0, which is about 400$ for 1TB).

Workload: https://github.com/Percona-Lab/tpcc-mysql
Configurations: other parameters are defaults.
CPU: AMD Ryzen 3900XT
MEM: 64GB, 3200MHz
OS: Ubuntu 20.10, all disks are ext4
MySQL: 8.0.22
The boxplot on the left:

  • Y-axis: max Latency (ms) of 95% of the transactions in 10 sec period (the lower the better). Each rectangle represents 20 repeated runs (in 200 sec). The red short line in the middle of the rectangle represents the median of the 20 data. The whole rectangle represents for the distribution of the 25%-75% data. The small circles are outliers that can be ignored.
  • X-axis: There are 8 rectangles, the first 4 are the latencies on the 4 different disks (which are shown in the legend on the right boxplot) respectively when --innodb-doublewrite=OFF; the last 4 are when --innodb-doublewrite=ON.

The boxplot on the right:

  • Y-axis: normalize the data in the left boxplot by divining the median of the first 4 rectangles (makes the red short line of them =1). In this way, I can compare the relative performance drop (i.e., how many times do the performance drop, this is what I wrote in the title: "8x" and "2x~3x") after turning on innodb-doublewrite. As shown, the red line in the Samsung 980's rectangle are ~8 times larger after using the doublewrite buffer.
  • X-axis: same as the boxplot on the left.

Why does this happen? Did I hit a performance bug?

Thanks!

en ter image description here

5
  • Could you explain those charts?? Why two? What units? What are the circles? 16 candlesticks, but only 4 legend entries? Etc.
    – Rick James
    Jan 10, 2021 at 7:54
  • I am really sorry for that @James, I added explanations. Could you please have a check? Thanks.
    – Tim He
    Jan 10, 2021 at 8:37
  • @TimHe Do you have any updates regarding this ? I noticed similar issues, many Gen 4 NVME performing very bad in MySQL 8 (high latency), did you manage to find a solution ? In my case only a Kingston DC1000B NVME performed good dba.stackexchange.com/questions/325796/…
    – adrianTNT
    Jun 4 at 14:22
  • I tested Samsung 980 PRO, 970 PRO, Seagate Firecuda 530 and other more consumer grade, they all had very bad latency except the Kingston DC1000B which I find very strange, "on paper" it is the slowest :)
    – adrianTNT
    Jun 4 at 14:23
  • Also ... I also use AMD Ryzen CPUs like you, this might be related
    – adrianTNT
    Jun 4 at 14:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.