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).
Configurations: other parameters are defaults.
CPU: AMD Ryzen 3900XT
MEM: 64GB, 3200MHz
OS: Ubuntu 20.10, all disks are
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
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?