HomeFreeBSD

Increase default zcmd allocation to 256K

Description

Increase default zcmd allocation to 256K

When creating hundreds of clones (for example using containers with
LXD) cloning slows down as the number of clones increases over time.
The reason for this is that the fetching of the clone information
using a small zcmd buffer requires two ioctl calls, one to determine
the size and a second to return the data. However, this requires
gathering the data twice, once to determine the size and again to
populate the zcmd buffer to return it to userspace.
These are expensive ioctl() calls, so instead, make the default buffer
size much larger: 256K.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #9084

Details

Provenance
Michael Niewöhner <c0d3z3r0@users.noreply.github.com>Authored on Jul 30 2019, 4:59 PM
mahrensCommitted on Jul 30 2019, 4:59 PM
Parents
R10:0eb8ba6ab688: Improve performance by using dmu_tx_hold_*_by_dnode()
Branches
Unknown
Tags
Unknown

Event Timeline

mahrens committed R10:85ce79bbc8cf: Increase default zcmd allocation to 256K (authored by Michael Niewöhner <c0d3z3r0@users.noreply.github.com>).Jul 30 2019, 4:59 PM