Memory leak in ZFS?

Emil Muratov gpm at hotplug.ru
Tue Feb 8 21:22:04 UTC 2011


>> >>Simple test: if you disable use of sendfile (but not AIO) in Samba,  
>> does
>> >>the problem go away?
>> >I've just disabled sendfile in smb.conf and I'll report in about 2
>> >days, after reboot which I will perform tonight.
>> >I hope it won't hit samba performance too much ;)
>> >
>> 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):
>>
>>
>> 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
>
> Try this. I the similar fix is needed for tmpfs, but there are some
> more issues and pending rewrite, so I decided not to touch it.
>
> commit 8e5885bce1afecd419e40240a2d7ab90deb0392a
> Author: Konstantin Belousov <kostik at pooma.home>
> Date:   Tue Feb 8 22:35:29 2011 +0200
>
>     Do not forget to activate the page
>
> diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  
> b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> index e8191b3..7343c72 100644
> --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c


What is this patch up against? I can't apply it to the STABLE. :(


More information about the freebsd-fs mailing list