Slow crash dumps, significantly slower than live core
The table below showscomparative data for approx 10.5G crash dumps, with various different dump devices (all zvol). The compression ratio for this scenario is 5.6, so about 2G of data is written to the dump device. The IO Size is 128k.
|driver||Parallel / Serial||dump time (s)||IORate||device write (ms)||write ns/pg||pages /sec|
What we can see from above is that the time for each write to the dump device (125 / IO Rate) is approx:
|driver||device write (ms)|
It appears that the observed dump performance issues are when using SATA or MR_SAS drivers. This is pretty much specific to dump, in that it is the SYNC/POLLED write path. Tests with savecore -L have not shown such differences (although SATA still about 2x slower than SAS, but that's probably closer to what we'd expect).
The conclusion is that the SYNC/POLLED write path (as used by dump) in SATA and MR_SAS is too slow.
The table also shows the comparison between Serial and Parallel dump times. The IORate is unaffected, as expected, but in cases with a reasonable IORate (mpt_sas) the compression parallelism provides significant benefit.
It turns out that the mr_sas driver checks for polled write completion after 10ms, which would explain why a write appears to take 10ms. By reducing this to 1ms (which is what is used if the command were issued via bolt_issue_cmd_in_poll_mode) dump times can be reduced significantly. The above 192s (serial) / 148s (parallel) times are reduced to 39s and 15s.
There is a similar issue in the ahci SATA driver. The poll wait time is 10ms. Reducing this to 1ms improves IORate by approximately a factor of 10. However, in the SATA case the IORate was about 20x lower, so dump writes still take twice as long as SAS. The reason for this is that the design of this driver causes the drv_usecwait() to be done twice on every call.
Updated by Electric Monk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
commit d8873b3136f0985c9e33ff8801644e1b4253b36c Author: Joyce McIntosh <email@example.com> Date: 2018-08-07T19:46:09.000Z 9695 Slow crash dumps, significantly slower than live core Reviewed by: Dan Fields <firstname.lastname@example.org> Reviewed by: Yuri Pankov <email@example.com> Reviewed by: Rick McNeal <firstname.lastname@example.org> Reviewed by: Sanjay Nadkarni <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Robert Mustacchi <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>