Ask / Submit

Which best 128GB microSDXC card for Jolla 1

asked 2018-01-22 03:15:53 +0200

prometheos de+it gravatar image

updated 2018-01-22 03:45:31 +0200

Which 128GB microSDXC card fits best for use in the Jolla 1?

My main pourpose ist to improve the usability of the BTRFS file systems (AKA subvolumes, in btrfs speak) @ and @home by increasing their size. e.g. we could reduce the space problems (balance), and use snapshots widely, not only for factory reset.

As we have here a file systems for servers, we want to be free to use its full lot of admin tools.

BIG DISADVANTAGE: removing the microSD card becomes (nearly) impossible (nearly unbootable system). But I personally never remove it (I use ssh and rsync).

Disadvantage: the probability of failure increases strongly (doubles, at least). I hope I will be able to repare it, with advice from the Linux blogs (To Do: Write a wiki).

Which large Micro-SDXC Card is good for random access?

edit retag flag offensive close delete


For granting the question a somewhat longer actuality I will concentrate numbers in the comments below.

prometheos de+it ( 2018-01-22 03:17:56 +0200 )edit

A main condition here: is a good speed for random access read/write. In most benchmarks of microSDs I find something about 2.0 MB/sec, which seems quite low, and would kill the general system performance on @.

On @home I expect much higher speeds due to the many large media files, which are used mainly sequentially. From here we can expect sequential speeds over 100 MB/sec.

How good have you found SanDisk Extreme Plus 95/90 MB/s U3 V30 microSDXC 128GB ? In the benchmark above we find for a random r/w of a half MB files promising 93.5/64.7 MB/sec (albeit about a tenth of it fo 4 kB files). That makes me hope!

We should compare this with the Ideal Expectations. These are:

The speed of today's SSDs, what we (hopefully) have as system disk in our laptops. For mine Crucial CT512MX1 I find today (look for IOzone) 7,499.99/407.99 MB/sec: quite one order of magnitude quicker then the MicroSDXC card, albeit surely not well comparable (but the magnitude will fit).

prometheos de+it ( 2018-01-22 03:28:07 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-01-22 13:11:50 +0200

DrYak gravatar image

First big caveat :

  • in my tests, the MMC port used by the SDCards is slower than the eMMC port used by the build-in memory

    (Meaning that even if you go for a UHS Speed Class 3 - the U3 logo on cards - you won't be able to achieve the maximal 90 MiB/s bidirectionnal advertised by the manufacturer.

that said...

Card Reliability :

  • aim for a card that provide static wear levelling in addition to the standard dynamic wear levelling.

    i.e.: Cards that also automatically wear-level and relocate data that is already stored on the card. On a 128GiB card, you're going to have quite a lot of data, but not all of it is going to be regularily over-written (dynamic). Some data stays the same untouched (static) and if left on the cells, there's a tiny risk of it going stale and bitrot (corruption happening) and/or the distorted cell levels giving more read error and the read speed suddenly dropping to a crawl (that's a problem that was even observed on Samsung 840 EVO SSD with early generation firmware)

  • aim for a card that features ECC (i.e.: error correction) so even in case of data corruption, it might manage to recover your data.
  • When possible, go for industrial variant of the card (they are usually certified for higher reliability) but it might not be available in the sizes that interests you (often, reliability is provided by using SLC or by using lower density MLC cells. Thus no 128GB for you).
  • Check forum for how the card behaves when dying. Most of the high quality brands will lock the card into read-only mode. That means you could always attempt to recover and extract files by plugging it into a laptop with a recent enough version of BTRFS and doing btrfs restore (or sometime just plain mounting with the recovery options and using older CoW copies).

In my personal experience, I'm quite happy with Transcent's Ultimate 633x line of cards (they also have 128GiB in slightly less fast Ultimate variants), it fulfills most of my criteria (ECC, static wear leveling). I've even successfully managed to use them for swap (and quite intensively) without burning them.

Btrfs reliability :

  • use RAID1 whenever possible (for metadata). If you've left the on-board BTRFS filesystem in default "dup" configuration, it will automatically upgrade to RAID-1 when you add the second volume. If you've converted to "single" (because on wear-leveled flash media, "dup" doesn't actually provide any advantage), you'll need to -mconvert.
  • btrfs scrub the filesystem often (like at least weekly), that will help detecting bitrot (and depending on the firmware running on the embed chip in charge of wear levelling, it might trigger ECC corrections and rewrite).
  • btrfs balance the filesystem also (e.g.: weekly). No need to go all the way to 100% like the automatic balancer that is run before system upgrades, if you go up to -musage=60 -dusage=60 that should be enough. That would help running out of free blocks (enospc) on the internal flash for the RAID-1ed metadata.
  • Do. Backups. Saddly the Jolla 1's 3.2 kernel's btrfs send isn't functionnal, but you can at least setup a pedioic rsync, in case of MMC media failure.
  • Do not try to fsck, or only as a last resort (after trying to recover/extract the files first with btrfs restore). Per-se, fsck doesn't make much sens on CoW (BTRFS, ZFS) and Log-structured (UDF, F2FS, etc.) filesystems. And the script provided on the Jolla Recovery image is very bad in my opinion (it tries stupid stuff like erasing the checksums).
edit flag offensive delete publish link more



Here a general paper about dynamic, static and global wear leveling (2008),

there some older info by SanDisk about wear leveling in SD-cards.

prometheos de+it ( 2018-01-25 14:44:56 +0200 )edit

@prometheos , :+1: thank you very much for the useful links.

DrYak ( 2018-01-25 14:51:32 +0200 )edit

Now I made my mind. Summarising, it seems to me that today all manufacturers keep covered about the exact qualities of their MicroSDXCs.

It seems they are not interested in hosting an OS, for which they would have simply to clone their own SSD controllers.

I go for 128 GB, and keep 10 to 15% for overprovisioning, hoping SanDisk will use that for wear leveling (like they seem to do for SSDs). The SanDisk paper (2003) says they reserved 3% for WL. For an OS I will need more.

I just ordered a SanDisk Extreme Pro 128 GB microSDXC Speicherkarte (270 MB/s, UHS-II, U3), for 199 eur.

prometheos de+it ( 2018-01-25 17:29:21 +0200 )edit

Something I forgot to add in my initial article :

After periodic balancing, remember to run FSTRIM, that will mark all the space that was freed by the balancing process as "unusused" for the flash controler, so the controller knows that it's unusued space that can be used again to write new stuff on it.

Note: Don't expect to actually get 270MB/s out of this card, the extrenal MMC port of the Jolla1 isn't that fast, as I've said before.

DrYak ( 2018-01-25 23:57:40 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2018-01-22 03:15:53 +0200

Seen: 369 times

Last updated: Jan 22 '18