HomeFreeBSD

FreeBSD: Optimize large kstat outputs

Description

FreeBSD: Optimize large kstat outputs

  • Use sbuf_new_for_sysctl() to reduce double-buffering on sysctl

output.

  • Use much faster sbuf_cat() instead of sbuf_printf("%s").

Together it reduces sysctl kstat.zfs.misc.dbufs time from minutes
to seconds, making dbufstat almost usable.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15495

Details

Provenance
mavAuthored on Nov 7 2023, 7:35 PM
GitHub <noreply@github.com>Committed on Nov 7 2023, 7:35 PM
Parents
rGe36ff84c338d: Update the kstat dataset_name when renaming a zvol
Branches
Unknown
Tags
Unknown