add tunable for maximum number of blocks freed in one txg
By limiting the maximum number of blocks freed during a single transaction
group, we can limit how much of the dedup table has to be brought into memory.
The e-mail thread referenced below suggests that destroying large numbers of
blocks in a single txg caused ZFS to run out of memory because the entire DDT
was brought into memory.
Originally proposed on the illumos-zfs mailing list, e-mail subject = "zfs
destroy memory usage / swapping to zvol", author = mahrens:
Ideally, we would add a tunable that is "maximum number of blocks to free in
one txg". Something like this patch should work; set it to around
100,000 for your workload.
Updated by Electric Monk over 5 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit af3465da8fa420c4ec701e3e57704d537a6f755b Author: Max Grossman <email@example.com> Date: 2014-09-11T00:31:57.000Z 5138 add tunable for maximum number of blocks freed in one txg Reviewed by: Adam Leventhal <firstname.lastname@example.org> Reviewed by: Mattew Ahrens <email@example.com> Reviewed by: Josef 'Jeff' Sipek <firstname.lastname@example.org> Reviewed by: Richard Elling <email@example.com> Reviewed by: George Wilson <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>