Date: Sun, 05 Apr 2015 09:31:55 -0500 From: Karl Denninger <karl@denninger.net> To: freebsd-fs@freebsd.org Subject: Re: Swap usage with ZFS Message-ID: <5521475B.4010703@denninger.net> In-Reply-To: <880944c05bb859ca0fc97b2d8606fe29@thebighonker.lerctr.org> References: <880944c05bb859ca0fc97b2d8606fe29@thebighonker.lerctr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format. --------------ms010508090006040107090403 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 4/5/2015 09:23, Larry Rosenman wrote: > I have a -HEAD (11-CURRENT) box that has 64G of memory, but very=20 > little load. > > The ZFS ARC grows to eat most of it, but I see around 200M in use in=20 > SWAP. This was under control > in 10.x. > > I'm wondering what information y'all need to help diagnose why. > > borg.lerctr.org /home/ler $ uname -aKU > FreeBSD borg.lerctr.org 11.0-CURRENT FreeBSD 11.0-CURRENT #32 r281050: = > Fri Apr 3 16:41:13 CDT 2015=20 > root@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER amd64 1100067 1100067= > borg.lerctr.org /home/ler $ > > > borg.lerctr.org /home/ler $ top > last pid: 26313; load averages: 6.92, 6.79, 6.83 up 1+16:26:05 = > 09:23:13 > 80 processes: 4 running, 76 sleeping > CPU: 0.0% user, 46.9% nice, 0.3% system, 0.0% interrupt, 52.8% idle > Mem: 281M Active, 539M Inact, 59G Wired, 18M Cache, 8128K Buf, 1241M Fr= ee > ARC: 55G Total, 42G MFU, 9766M MRU, 1044K Anon, 568M Header, 3437M Othe= r > Swap: 128G Total, 205M Used, 128G Free > > This is consistent with how the VM system is expected to behave absent=20 the patches I developed for 10-STABLE (and continue to maintain for same.= ) In short what is going on is that ZFS (absent those patches) will allow=20 ARC to grow until the pager not only wakes up and starts scavenging=20 cache pages but actively starts evicting working set to the page file. =20 It will then pare down the ARC but at that point you have paged out=20 working set process memory. I argue this is flat-out wrong as discarding ARC instead *possibly*=20 implicates one disk I/O (to retrieve said data) if the cached data is=20 later needed but a page-out of RSS *always* implicates one disk I/O (to=20 page out said data) and *possibly* implicates two disk operations (if=20 the RSS pages are later executed.) Therefore it is /*never*/ the correct decision to favor paging out=20 resident processes rather than discarding disk cache. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D187594 I do not know if this will apply against -HEAD. --=20 Karl Denninger karl@denninger.net <mailto:karl@denninger.net> /The Market Ticker/ --------------ms010508090006040107090403 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGWTCC BlUwggQ9oAMCAQICARowDQYJKoZIhvcNAQELBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYDVQQI EwdGbG9yaWRhMRIwEAYDVQQHEwlOaWNldmlsbGUxGTAXBgNVBAoTEEN1ZGEgU3lzdGVtcyBM TEMxHDAaBgNVBAMTE0N1ZGEgU3lzdGVtcyBMTEMgQ0ExIjAgBgkqhkiG9w0BCQEWE0N1ZGEg U3lzdGVtcyBMTEMgQ0EwHhcNMTUwMzI1MTMxMDIwWhcNMjAwMzIzMTMxMDIwWjBTMQswCQYD VQQGEwJVUzEQMA4GA1UECBMHRmxvcmlkYTEZMBcGA1UEChMQQ3VkYSBTeXN0ZW1zIExMQzEX MBUGA1UEAxMOS2FybCBEZW5uaW5nZXIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC AQCmk+jIznE3HgHbh4JU2s86dKGDs4f3ZdED6vCQx9+LnJl7GgT2aAUAARqNnH5dDuC4w/4h K1qb8sXu3yYWlXLLs+vw3oLnx284o0kSZZs/FQ9W90gVTeZ1iTybscN7iXkaf83g1jueBNby n4v1bJEwX/xe94NW0IwBPluOzzXVIMskaZWhqGLtSaiSo4PYUnYMXPRNG7NAWQ2VAZXJkIM2 AM0B3LfyT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AAAAA== --------------ms010508090006040107090403--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5521475B.4010703>