Re: [PATCH pve-qemu 2/2] d/rules: enable tcmalloc as the memory allocator

Fiona Ebner
2026-04-13T13:13:15Z

Am 10.04.26 um 6:29 AM schrieb Kefu Chai:
> Use tcmalloc (from gperftools) instead of glibc's allocator for
> improved performance with workloads that create many small, short-lived
> allocations -- particularly Ceph/librbd I/O paths. Ceph benchmarks
> show ~50% IOPS improvement on 16KB random reads.
>
> tcmalloc was originally used in 2015 but removed due to tuning issues
> with gperftools 2.2. PVE 9 ships gperftools 2.16, where those issues
> are long resolved.
>
> Signed-off-by: Kefu Chai <k.chai@proxmox.com>
> ---
> debian/control | 1 +
> debian/rules | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/debian/control b/debian/control
> index 81cc026..a3121e1 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -14,6 +14,7 @@ Build-Depends: debhelper-compat (= 13),
> libfuse3-dev,
> libgbm-dev,
> libgnutls28-dev,
> + libgoogle-perftools-dev,
> libiscsi-dev (>= 1.12.0),
> libjpeg-dev,
> libjson-perl,

Please also add the runtime dependency to Depends:

> diff --git a/debian/rules b/debian/rules
> index c90db29..a63e3a5 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -70,6 +70,7 @@ endif
> --enable-libusb \
> --enable-linux-aio \
> --enable-linux-io-uring \
> + --enable-malloc=tcmalloc \
> --enable-numa \
> --enable-opengl \
> --enable-rbd \