Bug 200628 - Wired memory not released after deletion from ZFS, kernel kills processes
Summary: Wired memory not released after deletion from ZFS, kernel kills processes
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 07:29 UTC by pascal.guitierrez
Modified: 2015-08-29 10:39 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pascal.guitierrez 2015-06-04 07:29:53 UTC
Seeing this behaviour on 10.1-RELEASE and 10.1-STABLE (May 26th) amd64 systems.

Systems are low-memory (2GB), but have also seen this behaviour on high (256GB) memory systems all without swap.

10.0-RELEASE seems to NOT be affected.

How-to-repeat:
Run a system without swap and a ZFS filesystem (eg: 1TB to 2TB used).
Appears to be triggered when deleting (either through snapshots, or via regular files) a large of amount data (hundreds of GB) (even with few files).
Wired memory skyrockets and is never reclaimed until hitting vm.v_free_min, after which the kernel randomly kills processes to stay up.
Once this has been done, sometimes the wired memory is reclaimed, sometimes not.
Exactly the same config on 10.0-RELEASE is not affected.

Have tried setting:
vfs.zfs.arc_max=128M (and lower)
vfs.zfs.zio.use_uma=0 (no effect)
increasing v_free_min and v_free_target = system just kills processes faster
Comment 1 Vladimir Laskov 2015-08-29 10:39:42 UTC
my test case on 10.2-RELEASE amd64

1. create 1G file 
# dd if=/dev/urandom bs=1024 count=1024 of=blockout.bin
2. while : ; do cat blockout.bin ; done | pv -brt | dd bs=1024k count=16000 of=blockout2.bin
3. see Wired and ARC counts on 'top' output
4. remove blockout2.bin
5. see Wired and ARC counts on 'top' output


my solution: disable UMA for ZFS
vfs.zfs.zio.use_uma="0"
vfs.zfs.arc_max="16G"

try it