On Fri 24 May 2019 03:56:21 PM CEST, Max Reitz <mre...@redhat.com> wrote: >> +-----------+-------+------+-------+------+------+ >> | file | before | after | gain | >> +-----------+-------+------+-------+------+------+ >> | ssd | 61.153 | 36.313 | 41% | >> | hdd | 112.676 | 122.056 | -8% | >> +-----------+--------------+--------------+------+ > > I’ve done a few more tests, and I’ve seen more slowdown on an HDD. > (Like 30 % when doing 64 kB requests that are not aligned to > clusters.) On the other hand, the SSD gain is generally in the same > ballpark (38 % when issuing the same kind of requests.) [...] > [1] Hm. We can probably investigate whether the file is stored on a > rotational medium or not. Is there a fundamental reason why this > patch seems to degrade performance on an HDD but improves it on an > SSD? If so, we can probably make a choice based on that.
This is when writing to an unallocated cluster with no existing data on the backing image, right? Then it's probably because you need 2 operations (write zeros + write data) instead of just one. Berto