From owner-freebsd-arm@freebsd.org Sat Mar 18 15:30:17 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5050DD12B68 for ; Sat, 18 Mar 2017 15:30:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 229B71161 for ; Sat, 18 Mar 2017 15:30:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id m27so50336159iti.0 for ; Sat, 18 Mar 2017 08:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=oa/o5e+vZ3ePtwCTDpiPltaLFyVMisjuSmewgRbmOJs=; b=bnDfXLMTRsAhSyhABxdy32GrpgcMi7nhp0l6f84d9fDTFkhsYvVT5kXZkNkmfd8FuA xb0Hce5mQPw87cCGxvhDYSNYP9Xg6cfz+KWxnjSX2kBe4wZ2v1o44Sda8vwKYdHy/b4m qiWAlA3lGlsibmCJm28LHsXYyaPLU5PqKN80W3gMd0uk0GMy4JiNrokwk4Vqqkc8Ni2C lpScjA0Xpz/8kGL2MDn6LV5y9HsCdlWBP4nRNdQ2N1PtLTTdKHhNcaBM5vIBG5pXWOz2 b0LLjznWQ/9wm8TuWPqmGudtdqeYb0GzcUDIM65cwee6qjsqwjMk39SLSuaesFfr1CIK xIqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=oa/o5e+vZ3ePtwCTDpiPltaLFyVMisjuSmewgRbmOJs=; b=kJDwo5WWAnnq26QhmhAOybIND4DLq/bXtOIf4sINOmqCmBxNaRdeyu1tddsT1TMZes 8QLizQmsPspHJykczsH0iI93NnNgNNHwdGs3+/6qA62ox9v+7c4qojdrRmxQkLxh12zm F6U8Az96IjhG2ktTTBHu5+OkGAlTFUdmo1phIpy6k1iqV73UL8p6ddu9kbQUF+zVHeS/ EGOaBzLunU8+EnbCWNqgSnwyM19Fd2r0XcAV0mAy9sVmz41VP8WRY1QtM2ZbDXE8/Gsx XUrk+0OGOkE/aZeEEhRwPlHEilfkpOP4vZGoJ++hRjRGGYzpb3o3I8OQRsRAyDm728Wi m9eA== X-Gm-Message-State: AFeK/H2UAjEgfyvCBAEkqzfN3aCtpIFm1JwasFk5kPNCK+wIiXHYy2luDYwv2rsWFaYJCOTQydHiTM+ihpmddA== X-Received: by 10.107.134.94 with SMTP id i91mr19837129iod.0.1489851016270; Sat, 18 Mar 2017 08:30:16 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.129 with HTTP; Sat, 18 Mar 2017 08:30:15 -0700 (PDT) X-Originating-IP: [2607:fb10:7021:1::108b] In-Reply-To: References: From: Warner Losh Date: Sat, 18 Mar 2017 09:30:15 -0600 X-Google-Sender-Auth: -4dJHlyoQbZ2QGIMXXGJ8c7i4ys Message-ID: Subject: Re: Identifying counterfeit microSD cards on a Beaglebone Black To: "Dr. Rolf Jansen" Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2017 15:30:17 -0000 On Sat, Mar 18, 2017 at 8:44 AM, Dr. Rolf Jansen wrote: > I bought a 16 GB microSDHC SanDisk chip rated at 4 MB/s write speed for u= se with my Beaglebone Black. > > The internal flash offers practical write speeds in the range of 2 to 3 M= B/s when copying data to it from a NFSv4 volume depending on the size of th= e files being copied. Executing the same copy operation with said microSDHC= card as the target I see only 0.1 to 0.2 MB/s (less than 1/10). > > I suspect now that I got a counterfeited card. Before I dump it, I would = like to run a definitive non-destructive test, preferably on the Beaglebone= Black, and I would like to ask you for suggestions. > > Also, it would be nice to see some speed values as a reference for microS= DHC card write speeds on: > > FreeBSD 12.0-CURRENT (BEAGLEBONE) #0 r315413 > > Many thanks in advance for any help. Copy a huge file from /dev/zero. Smaller files in the filesystem generate a lot of overhead and 'wait points' that slow down overall performance. Or better yet, dd to the raw device. /dev/random should generate data faster than the card can handle. Depends on what you mean by 'non-destructive' And all NAND sucks. It's a pig with lipstick on it. So you won't get even performance if the FTL in the SD card sucks. Garbage collection, internal house keeping, etc all can steal performance from the user application. These cards are generally designed to take a burst of writes when the camera or video is taken, then have it read back later. A mixed workload was never optimized for on most of these cards, so it can also significantly degrade performance even at low percentage mixtures. So all those things could be going on w/o it being a counterfeit. :(. Of course, it could have all those things going on and also be a counterfeit. Hard to say for sure unless the performance is wildly different. But 4MB/s write performance is pretty pathetic for a card of that size, so it's on the low end, which suffers most from uneven performance and "down hill with the wind" spec numbers. Warner