From owner-freebsd-fs@freebsd.org Wed Mar 7 17:16:36 2018 Return-Path: Delivered-To: freebsd-fs@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 C02C5F41A61 for ; Wed, 7 Mar 2018 17:16:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 1BE1181EBC for ; Wed, 7 Mar 2018 17:16:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 35ee8aa1-222b-11e8-bb8e-b35b57339d60 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 35ee8aa1-222b-11e8-bb8e-b35b57339d60; Wed, 07 Mar 2018 17:16:02 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w27HGR9h002443; Wed, 7 Mar 2018 10:16:27 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520442987.84937.12.camel@freebsd.org> Subject: Re: best settings for usb2 and attached disks, and sdcards From: Ian Lepore To: John , freebsd-current@freebsd.org Cc: freebsd-arm@freebsd.org, freebsd-fs@freebsd.org Date: Wed, 07 Mar 2018 10:16:27 -0700 In-Reply-To: <1520403325.3513270.1294320744.0B1DE142@webmail.messagingengine.com> References: <1520403325.3513270.1294320744.0B1DE142@webmail.messagingengine.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:16:36 -0000 On Wed, 2018-03-07 at 06:15 +0000, John wrote: > Hi, > [cc'd to arm@ and fs@ where it's also relevant] > > I have a number of rpi3 & rpi3 machines. Usually I want to attach a usb keydrive to them so that the sdcard isn't thrashed. They're all running -current. usr/src and usr/ports at least are mounted on the keydrive. > > When initially updating eg the ports tree, svn will time out/crash because of the poor write performance of these devices in a rpi2/3 context. The fs on the usb keys is always ufs2. I have tried mounting these devices as -o async and also in fstab but this parameter seems not to 'take' in that mount doesn't report the async property set: > > [...] > /dev/da0p2 on /ext (ufs, local, noatime, soft-updates) > [...] > > was mounted with the command "mount -o async,noatime,rw /dev/da0s2 /ext" > but I can't tell if async is on or just ignored, no error message. And I still have to run svnlite cleanup /ext/ports until svnlite stops bailing out. When newfs was written, I passed -t  to it to enable trim, which seems to make a difference on this for deletes but not writes. Can anyone please suggest anything I can so to speed up disk i/o? And is async being applied or ignored? > > thanks, If your ufs2 filesystem is formatted with soft dependencies, the async mount option does nothing (the ufs mount code forces it off when the softdeps flag is on).  Basically, softdeps IS async for ufs. If you have journaling enabled on the usb or sdcard filesystems, turn it off.  It just amplifies the writes to devices that are already very slow on writes, and the only benefit to journaling is that it speeds up fsck recovery.  Since sdcard and thumb drive filesystems tend to be very small already, the speed up from having journaling enabled amounts to a few seconds at best, and even that benefit only comes after a crash. -- Ian