From owner-freebsd-fs@freebsd.org Sun Dec 1 12:13:21 2019 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DAB91A99D3 for ; Sun, 1 Dec 2019 12:13:21 +0000 (UTC) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from uucp.dinoex.org (uucp.dinoex.sub.de [IPv6:2001:1440:5001:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47QnFq4VNZz3HT4 for ; Sun, 1 Dec 2019 12:13:18 +0000 (UTC) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.16.0.41/8.16.0.41) with ESMTPS id xB1CD5XP059870 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sun, 1 Dec 2019 13:13:06 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: X-Authentication-Warning: uucp.dinoex.sub.de: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: from citylink.dinoex.sub.org (uucp@localhost) by uucp.dinoex.sub.de (8.16.0.41/8.16.0.41/Submit) with UUCP id xB1CD53A059869 for freebsd-fs@FreeBSD.ORG; Sun, 1 Dec 2019 13:13:05 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.15.2/8.15.2) with ESMTP id xB1C6rBE073197 for ; Sun, 1 Dec 2019 13:06:53 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.15.2/8.15.2) with ESMTP id xB1C411i071315 for ; Sun, 1 Dec 2019 13:04:01 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: (from news@localhost) by gate.oper.dinoex.org (8.15.2/8.15.2/Submit) id xB1C41qC071311 for freebsd-fs@FreeBSD.ORG; Sun, 1 Dec 2019 13:04:01 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) X-Authentication-Warning: gate.oper.dinoex.org: news set sender to li-fbsd@citylink.dinoex.sub.org using -f From: "Peter Much" Subject: ZFS overgrowing arc_max -> OOM kills Date: Sun, 01 Dec 2019 12:52:53 +0100 Organization: n/a Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Injection-Info: oper.dinoex.de; logging-data="68697"; mail-complaints-to="usenet@citylink.dinoex.sub.org" User-Agent: Opera Mail/12.16 (FreeBSD) Sender: li-fbsd@citylink.dinoex.sub.org To: freebsd-fs@FreeBSD.ORG X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de; ) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (uucp.dinoex.org [185.220.148.12]); Sun, 01 Dec 2019 13:13:08 +0100 (CET) X-Rspamd-Queue-Id: 47QnFq4VNZz3HT4 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of li-fbsd@citylink.dinoex.sub.org has no SPF policy when checking 2001:1440:5001:1::2) smtp.mailfrom=li-fbsd@citylink.dinoex.sub.org X-Spamd-Result: default: False [4.03 / 15.00]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; NEURAL_SPAM_MEDIUM(0.38)[0.376,0]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.46)[ip: (1.23), ipnet: 2001:1440::/32(0.61), asn: 8469(0.49), country: DE(-0.01)]; NEURAL_SPAM_LONG(0.99)[0.992,0]; TO_DN_NONE(0.00)[]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[pmc@citylink.dinoex.sub.org,li-fbsd@citylink.dinoex.sub.org]; DMARC_NA(0.00)[sub.org]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:8469, ipnet:2001:1440::/32, country:DE]; FROM_NEQ_ENVFROM(0.00)[pmc@citylink.dinoex.sub.org,li-fbsd@citylink.dinoex.sub.org]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2019 12:13:21 -0000 Hi all, I thought this matter was solved a long time ago! In fact, I am using ZFS almost from the beginning, and I never observed it seriousely overgrowing ArcMax, until now (this is 11.3-RELEASE-p3). > System Memory: > 9.38% 187.32 MiB Active, 0.37% 7.35 MiB Inact > 78.60% 1.53 GiB Wired, 0.00% 0 Cache > 1.11% 22.14 MiB Free, 10.54% 210.59 MiB Gap > Real Installed: 2.00 GiB > Real Available: 99.19% 1.98 GiB > Real Managed: 98.33% 1.95 GiB > Logical Total: 2.00 GiB > Logical Used: 98.56% 1.97 GiB > Logical Free: 1.44% 29.49 MiB > Kernel Memory: 768.84 MiB > Data: 98.21% 755.05 MiB > Text: 1.79% 13.79 MiB > Kernel Memory Map: 1.38 GiB > Size: 98.79% 1.36 GiB > Free: 1.21% 17.10 MiB See the KMEM! Obviousely, this was the last useful vital sign from the machine, then it stalled normal I/O and did only network gatewaying: > last pid: 51252; load averages: 0.39, 3.09, 3.68 up 5+07:46:39 > 03:09:25 > 1569 processes: 3 running, 1530 sleeping, 36 waiting > CPU 0: 1.1% user, 0.0% nice, 5.0% system, 0.4% interrupt, 93.5% idle > CPU 1: 0.0% user, 0.0% nice, 3.4% system, 1.9% interrupt, 94.6% idle > Mem: 169M Active, 4K Inact, 204M Laundry, 1582M Wired, 85M Buf, 43M Free > ARC: 1026M Total, 483M MFU, 160M MRU, 11M Anon, 188M Header, 184M Other > 127M Compressed, 526M Uncompressed, 4.16:1 Ratio > Swap: 8192M Total, 1965M Used, 6227M Free, 23% Inuse, 56K In Now see the ARC: > ARC Summary: (HEALTHY) > Memory Throttle Count: 0 > ARC Misc: > Deleted: 22.35m > Recycle Misses: 0 > Mutex Misses: 22.11m > Evict Skips: 733.63m > ARC Size: 127.01% 1016.06 MiB > Target Size: (Adaptive) 25.00% 200.00 MiB > Min Size (Hard Limit): 25.00% 200.00 MiB > Max Size (High Water): 4:1 800.00 MiB This was steadily growing since 03:01 - likely due to the influx of metadata from these daily/security/100/110 "find" jobs. I did my calculations to cater for a 25% safety margin (which appear to be quite accurate), but nevertheless, ZFS goes beyond that. :( (Yes, this is i386 - it's a twenty-year-old machine. ;)) The problem started with OOM kills at 03:02 reporting "out of swap", which is bogus (there is no swap shortage); so I found a way to switch such annoying behaviour off: > vm.pageout_oom_seq=512 Then, instead, I got massive "indefinite buffer wait" messages. And these seem to come from what You can read above: out of kernel heap. PMc