Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2011 22:36:53 +0100
From:      Bartosz Stec <admin@kkip.pl>
To:        Jeremy Faulkner <gldisater@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Memory leak in ZFS?
Message-ID:  <4D51B775.2010100@kkip.pl>
In-Reply-To: <4D51A969.5090203@gmail.com>
References:  <AANLkTi=8fFwiaQ4%2Bm_cWFkXwpa4_W0_DDV2aW8vyNU4E@mail.gmail.com>	<op.vqjyb21daevz08@ghost-pc.home.lan>	<4D510BBB.1060708@kkip.pl>	<20110208102727.GA8555@icarus.home.lan>	<4D511F65.2050503@kkip.pl>	<4D519F97.2000805@kkip.pl> <4D51A969.5090203@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> gldisater@constans:~% zpool upgrade
> This system is currently running ZFS pool version 28.
>
> All pools are formatted using this version.
> gldisater@constans:~% sh memleak-detect.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@constans:~% uname -a
> FreeBSD constans 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #14: Tue Jan 18 
> 15:26:02 EST 2011     root@constans:/usr/obj/usr/src/sys/CONSTANS  amd64
> gldisater@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 memleak-detect.sh -m -r 60' to 
check it every one minute.

Cheers.

-- 
Bartosz Stec



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D51B775.2010100>