From owner-freebsd-current@FreeBSD.ORG Sun Mar 3 13:54:58 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B37BF9FE for ; Sun, 3 Mar 2013 13:54:58 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF01862 for ; Sun, 3 Mar 2013 13:54:58 +0000 (UTC) Received: from c-24-8-232-202.hsd1.co.comcast.net ([24.8.232.202] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UC9NL-000F38-Kq; Sun, 03 Mar 2013 13:54:51 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r23DsmJY089857; Sun, 3 Mar 2013 06:54:48 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.232.202 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18dI2Y7kSR1vC35tfeCWf66 Subject: Re: access to hard drives is "blocked" by writes to a flash drive From: Ian Lepore To: Poul-Henning Kamp In-Reply-To: <52867.1362317749@critter.freebsd.dk> References: <51323712.5000406@gmail.com> <20130303042043.GH286@server.rulingia.com> <1362317291.1195.216.camel@revolution.hippie.lan> <52867.1362317749@critter.freebsd.dk> Content-Type: text/plain; charset="us-ascii" Date: Sun, 03 Mar 2013 06:54:47 -0700 Message-ID: <1362318887.1195.221.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: deeptech71 , freebsd-current@FreeBSD.org, Peter Jeremy X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 03 Mar 2013 13:54:58 -0000 On Sun, 2013-03-03 at 13:35 +0000, Poul-Henning Kamp wrote: > Content-Type: text/plain; charset=ISO-8859-1 > -------- > In message <1362317291.1195.216.camel@revolution.hippie.lan>, Ian Lepore writes > : > > >I run into this behavior all the time too, mostly on arm systems that > >have an sd card or usb thumb driver as their main/only drive. > > This is really a FAQ and I belive I have answered it N times already: > > There are, broadly speaking, two classes of flash-storage: "Camera-grade" > and "the real thing". > > "Camera-grade" have a very limited "Flash adaptation layer" which typically > only can hold one flash-block open for writing at a time, and is typically > found in CF and SD cards, USB sticks etc. > > Some of them gets further upset if the filesystem is not the FAT they > expect, because they implement "M-Systems" (patented) trick with monitoring > block deletes in FAT to simulate a TRIM facility. > > A number of products exist with such designs, typically a CF-style, is > put behind a SATA-PATA bridge and sold as 2.5" SSD SATA devices. > "Transcend" have done this for instance. > > If you use this class of devices for anything real, gstat will show > you I/O write-times of several seconds in periodic pile-ups, even > 100 seconds if you are doing something heavy. > > For various reasons (see: Lemming-syncer) FreeBSD will block all I/O > traffic to other disks too, when these pileups gets too bad. Hmmm, so the problem has been known and unfixed for 10 years. That's not encouraging. One of the messages in the lemming-syncer mail thread might explain why I've been seeing this a lot lately in hobbyist work, but not so much at $work where we use sd cards heavily... we use very short syncer timeouts on SD and CF storage at $work: kern.metadelay: 3 kern.dirdelay: 4 kern.filedelay: 5 I might play with similar settings on some of my arm boards here. -- Ian