Memory leak in ZFS?

Bartosz Stec admin at
Tue Feb 8 21:37:05 UTC 2011

> gldisater at constans:~% zpool upgrade
> This system is currently running ZFS pool version 28.
> All pools are formatted using this version.
> gldisater at constans:~% sh
> PHYSMEM: 12268.94 MB
> ACTIVE: 427.57 MB
> INACTIVE: 724.98 MB
> WIRED: 10155.28 MB
> CACHED: 28.32 MB
> FREE: 556.16 MB
> SUM: 11892.32 MB
> ------------------------
> MISSING: 376.61 MB
> gldisater at constans:~% uname -a
> FreeBSD constans 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #14: Tue Jan 18 
> 15:26:02 EST 2011     root at constans:/usr/obj/usr/src/sys/CONSTANS  amd64
> gldisater at constans:~% uptime
>  3:22PM  up 8 days,  5:07, 2 users, load averages: 0.21, 0.22, 0.24
Have you noticed  MISSING count increasing over time or you just looking 
at this exact calculation?
This script is far from being perfect and I don't know as much about 
FreeBSD internals to calculate it to show exactly zero at this point (if 
it is possible at all).
It only calculates physical memory minus memory pools visible in top(1), 
and on my system it gives MISSING count about 36MB just after reboot.

What's important - check if this variable is stable over time. You can 
confirm memory leakage if MISSING is increasing over time or while using 
sendfile. You can try for instance 'sh -m -r 60' to 
check it every one minute.


Bartosz Stec

More information about the freebsd-fs mailing list