Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2011 15:36:57 -0500
From:      Jeremy Faulkner <gldisater@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: Memory leak in ZFS?
Message-ID:  <4D51A969.5090203@gmail.com>
In-Reply-To: <4D519F97.2000805@kkip.pl>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/08/11 14:55, Bartosz Stec wrote:
> W dniu 2011-02-08 11:48, Bartosz Stec pisze:
> We didn't need to wait 2 days :)
> Now I can confirm that sendfile under SAMBA + ZFS are responsible for
> issue. Here's sample output from my monitoring script[1] (update every 2
> seconds):
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.01 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 552.30 MB
> SUM: 1957.82 MB
> ------------------------
> MISSING: 69.58 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.07 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 551.80 MB
> SUM: 1957.38 MB
> ------------------------
> MISSING: 70.02 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.13 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 551.30 MB
> SUM: 1956.94 MB
> ------------------------
> MISSING: 70.46 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.19 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 550.80 MB
> SUM: 1956.51 MB
> ------------------------
> MISSING: 70.89 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.24 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 550.42 MB
> SUM: 1956.18 MB
> ------------------------
> MISSING: 71.22 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.30 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 549.92 MB
> SUM: 1955.74 MB
> ------------------------
> MISSING: 71.66 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.38 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 549.30 MB
> SUM: 1955.19 MB
> ------------------------
> MISSING: 72.21 MB
>
> PHYSMEM: 2027.41 MB
> ACTIVE: 61.14 MB
> INACTIVE: 40.44 MB
> WIRED: 1303.86 MB
> CACHED: .50 MB
> FREE: 548.80 MB
> SUM: 1954.76 MB
> ------------------------
> MISSING: 72.64 MB
>
> This behaviour has been seen while copying 600MB file from SAMBA share
> with sendfile enabled.
> It doesn't happen when writing to samba share, and it doesn't happen
> with sendfile disabled, both ways.
> For me it looks like memory which leaks should be added to wired pool
> and belongs to ARC, but appareantly this doesn't work well and WIRED:
> 1303.86 MB all the time.
>
> [1] http://pastebin.com/sQUyQbmm
>

Also occurring with the zfsv28 patch for 8-STABLE

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


-- 
Jeremy Faulkner



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