From owner-freebsd-arm@freebsd.org Tue Mar 22 03:47:43 2016 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 63E9DAD8D00 for ; Tue, 22 Mar 2016 03:47:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (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 3194F38B for ; Tue, 22 Mar 2016 03:47:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by mail-pf0-x232.google.com with SMTP id u190so292162162pfb.3 for ; Mon, 21 Mar 2016 20:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:from:in-reply-to:date:cc:message-id :references:to; bh=e/wNeQocCtaO8I5KrR5VtuVW5ylz6rwrf7RpIPFMN/I=; b=nbVfF+rMUt+dwtB4e/VjT6gSMGG+eY4Lm35Nkz4Z9syJa+SQZ8gO6R5Xk7R8TzfhOS vByXwXWIJubKQgFg999GaXlmvoKkgobE6oHOQb+fKN6pizj/ZCDmjxjP/LXRpSUSt6k/ Kid50aIdDe4PFzzTe5BDdnG7DXy+U1bxzv7/ibgT+wQ1X4kAoDvUlnnqwtTN7hGUM/1r Pp0Af4NueX1RzuuI+PRFBWFEBr7kmOPZXSXqrJKNxRNuJK4rLPJyJ3EgWCrLrOBHhGkV lz35CPCdLaCsg8L+iyU/GjNWp2Aka/FZUf1ZN3geQcZcnCE4iMI6+06RGPUL+gdsNhxW 7w3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:from:in-reply-to :date:cc:message-id:references:to; bh=e/wNeQocCtaO8I5KrR5VtuVW5ylz6rwrf7RpIPFMN/I=; b=dQNyjyJUUD8j4IM5oA/3riKwubCJ+FpXunbhv6VJbyOc6wh485xhEIV4dpfiRw3v99 RqD263adi0O5XUnXedAwE+7btirunsRaXGFqA87ytzGEHBUFAcu0349ZDgmG1V6Qr9OG IEwTmxUJr6Glw7Fe+j5QYVJAVXyJUN8g7mi8RZwUnEfDBSc56fcImnf/HznBrPW/tXKb bW5jZkcUO7aR9KcWskuGcjjyqDmzcVjLanZQt9YAIphsNJddCOdtPfR8Yp476S11d6Qw 3pF0wZsgkf6RaySJQjFLROiPXuFoeIKw19pqxr9QHJxrATei2w3qAZhgCbQFfn6PG/QM X8rw== X-Gm-Message-State: AD7BkJKSK/olbF2NfDfWM2UXwedMaSQKB7xfCJSYTV4LhB0gHrulTo/n7bqbSNQ7fZbCGg== X-Received: by 10.66.90.199 with SMTP id by7mr50440953pab.113.1458618462722; Mon, 21 Mar 2016 20:47:42 -0700 (PDT) Received: from [100.127.129.191] ([69.53.245.19]) by smtp.gmail.com with ESMTPSA id v74sm3695257pfa.7.2016.03.21.20.47.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Mar 2016 20:47:42 -0700 (PDT) Sender: Warner Losh Subject: Re: Effect of partitioning on wear-leveling Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8C9DC301-4A05-4F2E-A703-6D525CB13CFC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20160322032832.GC83908@www.zefox.net> Date: Mon, 21 Mar 2016 21:47:39 -0600 Cc: Ian Lepore , freebsd-arm@freebsd.org Message-Id: References: <20160321175952.GA83908@www.zefox.net> <1458586884.68920.96.camel@freebsd.org> <20160321221153.GB83908@www.zefox.net> <1458600070.68920.107.camel@freebsd.org> <20160322032832.GC83908@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2016 03:47:43 -0000 --Apple-Mail=_8C9DC301-4A05-4F2E-A703-6D525CB13CFC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 21, 2016, at 9:28 PM, bob prohaska wrote: >=20 > On Mon, Mar 21, 2016 at 04:41:10PM -0600, Ian Lepore wrote: >>=20 >> Also, it's been my experience that it's impossible to "wear out" an >> sdcard. I once ran a program that just wrote random data = continuously >> at full speed to a 512MB card for several months nonstop. No = noticible >> effect on the card. I actually still use that card today (in one of >> our older products whose filesystem image only needs about 40MB). >>=20 >>=20 > Have you ever checked to see how much of the 512 MB capacity remains? > Seems that quite a lot of decay wouldn't show up if you're using less > than 10% of the device's capacity. If you are writing to only 10% of the LBA range, you should have 90% of the LBA range in addition to the normal reserve. This should mean that = you=E2=80=99ve got 10x the normal reserve (since normally the reserve is in the 10% = range, give or take). SD cards don=E2=80=99t lose capacity. Then tend to fail = read-only or read-never when they reach their end of life. So let=E2=80=99s do the math. 512MB cards tended to have write speeds of = maybe 6MB/s. At 6MB/s, that=E2=80=99s about 518MB/day, or one drive write per day. = Most SD cards, when you can find a rating, are good for between 0.3 and 1 drive write = per day over their life (some are more durable, granted). 0.3 DWPD would mean = that we=E2=80=99re putting wear not he part at 3x the normal rate. Over several month, = that=E2=80=99s nowhere near the 3 year design point that most SD cards implement. It=E2=80=99s = maybe 2 years of wear tops. If it=E2=80=99s a better card, it isn=E2=80=99t even one year = worth of writes. So it isn=E2=80=99t too surprising that Ian=E2=80=99s experience = wasn=E2=80=99t so horrible. I ran a similar experiments and failed to wear things out. It wasn=E2=80=99t until I = worked at a NAND card maker that I ever wore out NAND. And to do that I had to wear out = some tiny percentage of the drive by artificially limiting the range of NAND = used to a range of erase blocks (usually around 50 or maybe 10 GB of space) and = writing at full speed (something in the neighborhood of 1GB/s) would give maybe 50 P/E cycles an hour (due to swell limitations), leading to wear out = over a long weekend=E2=80=A6 And that=E2=80=99s using ~1% of the capacity of the = drive at a time. Warner --Apple-Mail=_8C9DC301-4A05-4F2E-A703-6D525CB13CFC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJW8MBcAAoJEGwc0Sh9sBEAJWkP/R/Jf+tROSgcTlhhJC2Z4S5W zi0knjml1KFchPzEpxkAwvmmBVrNLewbDgAYYO9UZtzw4b+wAtLBG/Hj/AB1V/tR RcCtvsm8ovTjpJQxzDEZ7UvGW1oecjMwjYHkrW11JbkGmuMsrH03KyxYv+E7YLc/ hdEFjNA9+jFy52lTIsu2r37/CXshyzt1BLIJS1enyGXq7ByV1e7XJ/E23AaXXoNe 3y4FRqddZIHE9vK8wp2HPEksCk9BGqtaqThtSWB0VuOK0gsxiP+kgS+ARrwHBv90 KjZReSTtScQlDFg0jNj2V2LV/cjL6QGITSUsO3fAiPHrfkQErrfdNVx91WHAF1EK lKRa59MGyxcA4zYPtvJ3be+z7O6DCVDZ8e4dYgkqPDPma3YucotSzHaX+XczomAa 76WiBB4oRRifmlqMjdSjKd+NCNQx3z/dyzjSlwISv9JHHcX14SMNFDX2OlWCd9WH dJvO8qXlGWC3bFBYjfISlvNKuTKLkl3CktKPQDb4PVknZG3VVzTLrJa4gXoizkQo vAcAEBcYjY3DUdAA5nkfdVe4nJV0tJUiEiwt7iRAisy5wuCwhDh4/TXSVebwFss0 c605dUMFHXNciCzGG9mBf0wTR7QFDgWwzkxCA3cgJHVy32epHRmacNW/iLXrjLDm XTEfRIa8Fs3pS0vPoYCc =k5q9 -----END PGP SIGNATURE----- --Apple-Mail=_8C9DC301-4A05-4F2E-A703-6D525CB13CFC--