From owner-freebsd-arm@freebsd.org Sun Jul 1 21:17:20 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 6ED2CFDD25F for ; Sun, 1 Jul 2018 21:17:20 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D37C17F3FB for ; Sun, 1 Jul 2018 21:17:19 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id w61LHXxP052986 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 1 Jul 2018 14:17:34 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id w61LHXlx052985; Sun, 1 Jul 2018 14:17:33 -0700 (PDT) (envelope-from fbsd) Date: Sun, 1 Jul 2018 14:17:33 -0700 From: bob prohaska To: "Rodney W. Grimes" Cc: Mark Millard , freebsd-arm@freebsd.org, bob prohaska Subject: Re: RPI3 swap experiments Message-ID: <20180701211733.GC52656@www.zefox.net> References: <20180701191741.GA52656@www.zefox.net> <201807012011.w61KBZka029690@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807012011.w61KBZka029690@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.5.24 (2015-08-30) 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: Sun, 01 Jul 2018 21:17:20 -0000 On Sun, Jul 01, 2018 at 01:11:35PM -0700, Rodney W. Grimes wrote: > > IIRC the "delay" through a usb hub, as long as your not doing transactional > translation (TT, ie 480 mb/s down to a 12mb/s device) is on the order of > microseconds, this is the same weither it is a powered or un powered hub. > > I doubt that any flash drive can respond faster than a spinning rust > drive with a cache can, as the cache is DRAM with tens of nano seconds > access time. > > Flash drives DO have an access delay, the FTL still has to do the mapping > funcions, and a page of flash has to be pulled into a read buffer. I > actually believe that even the fastest USB flash drives are still > slower than any modern spinning rust at this operation. > There is a sorted list of gstat output from one of my tests at http://www.zefox.net/~fbsd/rpi3/swaptests/3gbusbflash/readdelay.sort The first few lines suggest that microSD responds in less than a millisecond, direct-connected USB flash requires 1.2 milliseconds and hub-connected USB flash takes 1.6 milliseconds. I'm not sure how representative these numbers are, the -u option was used in sort. There's a similar list for a mechanical drive at http://www.zefox.net/~fbsd/rpi3/swaptests/newtests/1.3gbusbmechanical_swapinfo/readdelay.sort where the minimum delay is 6.4 milliseconds. It's tempting to think that at least occasionally flash storage beats mechanical storage. The mechanical drive I used is an old 2.5" salvaged from a Dell compact desktop computer, stuffed into a USB enclosure, so it surely isn't the fastest in the world. Thanks for reading! bob prohaska