Sample Header Ad - 728x90

Could cloning / imaging SSD cause MySQL data to be more fragmented?

1 vote
1 answer
51 views
On a MySQL server (InnoDB tables) with /var/lib/mysql around **350 GB**, I cloned the nvme SSD (using Macrium Reflect) in order to compare query speeds with a faster SSD. But queries are around 4 times slower after cloning to the new disk. I compared by ... 4 computers that have same config and data is sharded equaly, so they all kind of run at same speed, the one that had disk cloned it completes same tasks 4 times slower. I restarted all servers to rule out any existent caching to ram. I also seen that all 3 servers rebooted in seconds, while the one with cloned SSD needed a few minutes to complete some background MySQL tasks before shutting down. But I didn't notice any background SQL tasks running while it was ON. I don't think it was one of those long background processes that reverts long operations that failed. Could **cloning the SSD** cause the data to be somehow **more fragmented** ? I tried to "optimize" tables just to see if it improves anything, but optimizing ~15GB table runs for 24 hours and counting, so that was a bad idea. The SSDs are different, previous one was Kingston DC1000B ("enterprise") and second one is Samsung 980 PRO. From crystaldiskmark benchmark the Samsung should be 2-3x faster reading, 6x times faster writing, double the IOPS on small files.
Asked by adrianTNT (206 rep)
Mar 31, 2023, 12:39 PM
Last activity: Mar 31, 2023, 04:21 PM