From owner-freebsd-current@freebsd.org Fri Nov 27 18:04:27 2020 Return-Path: Delivered-To: freebsd-current@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 B6EAE4AD90C for ; Fri, 27 Nov 2020 18:04:27 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjMvt4S0Vz3pTs for ; Fri, 27 Nov 2020 18:04:26 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D7D39953 for ; Fri, 27 Nov 2020 13:04:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 27 Nov 2020 13:04:24 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudehgedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehgtd erredttddvnecuhfhrohhmpehtvggthhdqlhhishhtshcuoehtvggthhdqlhhishhtshes iiihgihsthdrnhgvtheqnecuggftrfgrthhtvghrnheptdehiefgvddufeekkedvtdefvd ettddtkeduvdegveelffdtkeffudejvdfhudetnecukfhppeekvddrjedtrdeluddruddt udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehtvg gthhdqlhhishhtshesiiihgihsthdrnhgvth X-ME-Proxy: Received: from rpi4.local (fws.zyxst.net [82.70.91.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 975AC3280066 for ; Fri, 27 Nov 2020 13:04:23 -0500 (EST) Date: Fri, 27 Nov 2020 18:04:21 +0000 From: tech-lists To: freebsd-current@freebsd.org Subject: Re: possible usb3-connected hard drive spin down causing lag Message-ID: Mail-Followup-To: freebsd-current@freebsd.org References: <1299467375.48.1606491264664@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oI8tY4uKrx8tBVEm" Content-Disposition: inline In-Reply-To: <1299467375.48.1606491264664@localhost> X-Rspamd-Queue-Id: 4CjMvt4S0Vz3pTs X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[zyxst.net:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.998]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[64.147.123.21:from]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.21:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[zyxst.net:s=fm1,messagingengine.com:s=fm1]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[zyxst.net]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[64.147.123.21:from:127.0.2.255]; RWL_MAILSPIKE_POSSIBLE(0.00)[64.147.123.21:from]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 18:04:27 -0000 --oI8tY4uKrx8tBVEm Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 27, 2020 at 04:34:24PM +0100, Ronald Klop wrote: > >Mind to share these tips, so I can use them on my RPI4? ;-) sure! I'll write up a simple site later, but in summary this is what=20 I've done subsequent to the initial setup. E&OE, if it breaks you=20 get to keep both bits, no guarantees etc etc. In no particular order: 1. in /boot/msdos/config.txt there's this: over_voltage=3D6 arm_freq=3D2000 sdram_freq_min=3D3200 [I use a FLIRC case to keep it cool. you *must* use cooling for this. Max temps I'm seeing under very heavy compiling (it runs poudriere) is 72 degC in 25 degC ambient] 2. /usr/src /usr/ports /usr/local /usr/obj /home /var/cache/ccache are all on the usb3 disk, seperate datasets. 3. swap is 16GB and is the first partition on the usb3 disk 4. for compiling, ccache is a must. 5. set tmp to tmpfs in /etc/fstab. I use 1GB like this: tmpfs /tmp tmpfs rw,mode=3D1777,size=3D1024m 0 0 6. make things like mutt use this /tmp 7. enable powerd and on bootup. Make it almost always use the overclocked speed like this in /etc/rc.conf powerd_enable=3D"YES" powerd_flags=3D"-r 1" This makes it run @ 2GHz always without needing to set something like boost= _turbo. 8. in /etc/sysctl.conf: vfs.read_max=3D128 # default 64 9. compile mutt with kyotocabinet which uses (I think) memory mapping for c= ache lookups things like that. Faster than on-disk. 10. Look up the spec of yr usb3 connected device. Does it have 4k sectors? If it does, if you're using zfs make sure vfs.zfs.min_auto_ashift=3D12 in /etc/sysctl.conf 11. if you do compile stuff it'd be worth using -j3 if you want reasonably = responsive interactive use from the pi while it's compiling. Like I've said, this isn't even guaranteed to work. All I can say is it's whats working on my rpi4/8GB now and I'm very happy with it. --=20 J. --oI8tY4uKrx8tBVEm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAl/BP50ACgkQs8o7QhFz NAWYhhAAgWr7mCKfra+MkR98XtpvezwvjvMxrSfWCY+F10EvidjWEK3P+T2hWf40 JntTn1o1eWVZ75hDJFv5ITMXcmdVzjx2+SYGMxNlFAsWvD7TZs8pbPX2Ijya3TKK D8vaKkSulf+XLPHDDgV/cSjB0ZgADDCe38oanDNus3CDklHH0srNpUvp8F43o5BV +4hurQy2HCMm+Bgc6hBPLQdt8861CHbS/HPhyTjBxvuG/2zHmrgMzmLQEDBfheG5 4C6jsGWYShaMHYO+PabZPt+3A85OYSJUSN/75A1bYdxVEqaH+mo7hDel4uHSPoIs Lv0qygAsqHBVTp+k25N+koTG8TljC0HfOhj9QxxrVjKTnMSbwo5HeaSdsrLJP6jj bHkPN/cP446/EXVSwhYBEo61GRFWc4XI+NsTx2xxi/dOaOSPekihzteA2w/aiiF8 bYN0xvyT0pI1WH7gNe3jYNda9+pjVCN/kppZ9NELk2Q/WYKe1DmjH3M1L9lh+T/v FHHsel34VXl5YIH8brWztlY3xzApfGLNGxqJovptFfEiOuD3WURX4CVEjDUzNeqb 8v9OhfwSkUSrNzEonI1C0PueDDZOTPfptj2noj2DPzHzvcu8gRbg8HgE9gNPpH3w Av7KEL1YfygmJI+rS6HWhUPzCyrycvaSbvV+YtyPFWg8IA7ZohQ= =maqm -----END PGP SIGNATURE----- --oI8tY4uKrx8tBVEm--