From owner-freebsd-arm@freebsd.org Sat Sep 15 08:08:35 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE51F109FAFB for ; Sat, 15 Sep 2018 08:08:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-20.consmr.mail.gq1.yahoo.com (sonic302-20.consmr.mail.gq1.yahoo.com [98.137.68.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4903883A11 for ; Sat, 15 Sep 2018 08:08:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: MAN6k_AVM1kmbWGP8uUswX_doXPkQsqp7OOYB9DPVdCS9ib8Lye4IS_2lwPCzJW ZVDs_olqK2GYoNx.GWTP0bZil70J_pJLjPBdU6u6BMVqNON7A_Ym_keO3OWi_GLFN1EkMDu2lZA0 r7yC76dkh8GdZkEMMC2HRc8iGPiZ6LwFVPuYPWWXWSi21ywOvf3hl0ONiyxYUIMUlK1h_yqcleiI OneUxy2GNBQe0f.cGr9I8_d87c9fP5mr4JUOCKMA6Nc1VbIWvern9MCDbetkxEFQnBav6nXv9KpZ 6TtyDhcdNq_LnKlHGfXZd4x61UkDB0fcZ_Bee.R1x5fJ8J43az.9F7Hkxrx2xbf5Y90A1pTK27Xa KWqkziT7NaAvcyCilQnIyvOB9DSggTZnEjky2rlH8Exv7JC1HMAVMd15hM9tupFE8dF__FQa6Eay zTaX48UVE5zbsGK.O0Of_0f6bIMupemdw8yR5SOIOz7IPqUFN3vW0fqgJzpIhfWZWCxgSLls_KyJ 7VKAdeBXCKnxjTXNGbTEGOVNeZuLeFbXnu7d.1Y2DV_Yo4NA.QDwMzv5b1OQ.IEuRmX8A9mdDUzw uPYXRSMYSj84WtE7zgZbrssd0mDiDhu0V6Euj7D1O3TOJdjb1BEL6.KaBz.HQb55v28fR84wp07R HZe4jnmAdIa5FKq4wf1PfFZpd87tJ4_oBZLdxRcEL7kzGN6bkmiEH667bScEINDU8GqhNM5r_p3b clJHaK.9pN1jO_gRiKpRSDUf4aQ07RJpE6hNAsN0cka1USuHpuBzsNWGdiXuuEHApHvwuVldk6y3 ImorrNQiJ84ba53nyXgPKLkV.3gilrIydpWagAK4ELbsRUWfWZlB0jI4KbIAaDu_G8OU0F4YcDoZ XPFvZ_3LZF0_VsC3dcxl.H0MkiALNs.uyXzBE32.T17eRy4pm35W3.ATr84sHxWqp_nx3xVALZmh 55yUSnJfWMxRZCuUABdnSxawKPYRQM.IuW3UVZ8TXIJfCXZbwGqRT8m4FuXms_5Xx1ui5XrAVWiS tyEMFKrYp Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Sat, 15 Sep 2018 08:08:28 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp423.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 1e64cad8386f9741debd7e8214fa78de; Sat, 15 Sep 2018 08:08:23 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: RPI3 swap experiments (r338342 with vm.pageout_oom_seq="1024" and 6 GB swap) From: Mark Millard In-Reply-To: <20180915050842.GA65045@www.zefox.net> Date: Sat, 15 Sep 2018 01:08:22 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180815013612.GB51051@www.zefox.net> <20180815225504.GB59074@www.zefox.net> <20180901230233.GA42895@www.zefox.net> <20180906003829.GC818@www.zefox.net> <20180906051520.GB3482@www.zefox.net> <059D2FED-6E7C-4FEF-8807-8D4A0D0B3E26@yahoo.com> <20180906155858.GA5980@www.zefox.net> <075BD4BB-CAFB-4C9B-809A-10901522D1ED@yahoo.com> <20180915050842.GA65045@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2018 08:08:36 -0000 On 2018-Sep-14, at 10:08 PM, bob prohaska wrote: > On Thu, Sep 06, 2018 at 10:32:50AM -0700, Mark Millard wrote: >>=20 >> It appears to me that for the devices that you are currently using, >> you are better off for elapsed time having the swap only on the >> sdcard. >>=20 > In practical terms this seems true. I set up a 16 GB Sandisk Ultra > Plus microSD card with a single partition for / and 1.8 GB of swap=20 > at the end, running r338572 with vm.pageout_oom_seq=3D"1024". It = finished=20 > -j4 buildworld successfully but ran out of space in buildkernel. 32=20 > GB would have been far more than sufficient. I build with debug symbols but with optimizations still enabled. The last time I built on 32 GByte media the buildworld/buildkernel tree was: # du -sm /mnt/usr/obj/* 11024 /mnt/usr/obj/cortexA53_clang With ports builds and installs and the like to do I found 32 GByte not being big enough: # du -sm /mnt/usr/* 518 /mnt/usr/bin 1 /mnt/usr/home 25 /mnt/usr/include 2241 /mnt/usr/lib 1 /mnt/usr/libdata 13 /mnt/usr/libexec 2949 /mnt/usr/local 11024 /mnt/usr/obj 2423 /mnt/usr/ports 58 /mnt/usr/sbin 106 /mnt/usr/share 3968 /mnt/usr/src 145 /mnt/usr/tests 19 /mnt/usr/typescripts So just /usr totaled to: # du -sm /mnt/usr 23484 /mnt/usr # df -m /dev/da4s2a=20 Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/da4s2a 29400 23966 3082 89% /mnt I had the swap on another device. I also do not expect nearly full flash media to perform well, instead preferring to have lots of free space of some form, for example instead using 128 MByte media (that does have swap on it): # df -m Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/label/PINE64P2Groot 109101 38396 61976 38% / > There were many spurious > "indefinite wait" It looks like the distinct swap_pager messages for the ultra plus only example were (for those recorded in swapscript.log anyway): $ grep swap_pager: ~/Downloads/swapscript_rpi3_ultra_plus.log | sort | = uniq Sep 11 07:12:52 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 88445, size: 4096 Sep 11 07:13:01 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 464452, size: 12288 Sep 11 07:13:56 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 11922, size: 4096 Sep 11 11:34:08 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 295286, size: 8192 Sep 11 11:34:08 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 371269, size: 4096 Sep 11 12:48:23 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 408974, size: 4096 Sep 11 13:09:07 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 293166, size: 8192 Sep 11 13:10:19 www kernel: swap_pager: indefinite wait buffer: bufobj: = 0, blkno: 226334, size: 8192 > and a few "out of swap" warnings on the console, I do see one swap_pager_getswapspace in the swapscript.log (original name): $ grep "swap" ~/Downloads/swapscript_rpi3_ultra_plus.log | sort | uniq Sep 11 04:34:35 www kernel: swap_pager_getswapspace(32): failed . . . But I do not find "out of swap". I do not see examples of I/O error reports. > but nothing came of them. A faster microSD card might have avoided > the warnings entirely, the Ultra Plus isn't the fastest horse in the > stable.=20 I do not know what mode of use the microsd card was used in. That likely would be reported in "boot -v" output. A point that might contribute is if the microsd cards have application class A1 (or A2) or not. Paging is not sequential I/O of just one type. > I neglected to salvage the buildworld timing, but it was under 24 = hours. The log file shows: World build started on Mon Sep 10 14:55:38 PDT 2018 . . . World build completed on Tue Sep 11 13:14:12 PDT 2018 So somewhat under 22 hours and 20 minutes. > Aftr moving /usr/src to a separate USB3.0 flash drive I repeated that > test, adding experiments with swap on the same USB flash drive and > swap on a second USB flash drive. All the tests succeeded, none=20 > sufficiently faster to justify the expense and complication of =20 > a second storage device. >=20 > The log files are at > http://www.zefox.net/~fbsd/rpi3/swaptests/r338572/ > if anybody's interested. >=20 > It might make sense to divide storage to protect valuable data=20 > from wearout, but I've not seen any evidence (knock on wood!) > that wearout of flash media is a serious problem with the Pi. >=20 > Setting up a physical swap partition by hand at the end of the > microSD card is fairly difficult. If it could be automated through > the machinery invoked by /firstboot that would be a useful feature. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)