public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Linus Walleij <linus.ml.walleij@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Andrei Warkentin <andreiw@motorola.com>,
	linux-mmc@vger.kernel.org,
	Sebastian Rasmussen <Sebastian.Rasmussen@stericsson.com>,
	Ulf Hansson <Ulf.Hansson@stericsson.com>
Subject: Re: MMC quirks relating to performance/lifetime.
Date: Sat, 12 Feb 2011 11:45:41 +0100	[thread overview]
Message-ID: <201102121145.42053.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTimZb-hxz-31nGmycdtU-i=t=9wBoDJ-chAXUmD6@mail.gmail.com>

On Saturday 12 February 2011 00:23:37 Linus Walleij wrote:
> H'm! That's an interesting resource indeed. When you write
> "From measurements, it appears that the size in which data is
> managed is typically 64 kb on SD cards" and "the size of the
> medium is always a multiple of entire allocation groups, and
> the most common size today is 4 MB" and then list
> Size, Allocation Unit, Write Size, Page Size, FAT Location,
> open AUs linear, open AUs random, Algorithm.
> 
> How exactly do you measure that?

It's not an exact science, but for most cards I have found
reasonably good ways to identify these numbers:

* the allocation unit size can almost always be found
  using read-only tests: reading 2kb across an allocation
  unit boundary is slightly slower than reading 2kb
  just before or just after the boundary.
  For a few cards where this doesn't work, I do write tests.
  After finding out how many allocation units can be open,
  it's trivial to find out the size.

* Finding the number of open allocation units means I write
  to the start of a few AUs alternating. Up to a certain
  number, the throughput is constant, above that, it drops
  sharply, sometimes by one or two orders of magnitude.

* The page size can also be found doing read-only tests, with
  varying block sizes. Smaller reads always give lower throughput
  than larger reads, but getting smaller than page size
  drops down significantly more than the difference between
  multi-page reads. This effect is more prominent in write tests.

* Finding the algorithm basically means I write an allocation
  unit using varying block sizes two times, using both linear
  access and random access. Cards that are optimized for
  linear access can be unbelievably slow in the random access
  tests. Sometimes the performance is the same above a specific
  block size, but slower for random access below that size.
  This is the write block size.

* Finding the write block size in cases where this is not the
  case can be harder. Most cards have a noticable performance
  drop in writes of less than a few pages, so that's the
  size I put in the table.

* The FAT location is clearly visible in a number of tests
  done inside of an allocation unit. It's normally slower for
  linear access, but faster for random access. Sometimes
  reading the FAT is also slower than reading elsewhere.

> I'm sort of smelling a card-probe.git with this tool that you
> can run on your device and get out data like that listed
> in your table. We have a rather large stash of cards we can
> probe for you to get that kind of data out if it is useful, and
> I believe other Linaro members may have such stuff too,
> if empirical data is usefult to your work.

The tool I'm using is on http://git.linaro.org/gitweb?p=people/arnd/flashbench.git
Unfortunately, it's not yet in the state that I'm recommending
anyone besides me to run it. I'm still rewriting the source
for every new card I get to nail down the specific properties.

I will make an announcement when I have the tool in a state
of general usefulness, and at that point I would really
appreciate people to run it, but just not yet.

	Arnd

  reply	other threads:[~2011-02-12 10:45 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikh4vfS7SLKAa-aUXhbTxcHzYHmBuaXj1qHHYN9@mail.gmail.com>
2011-02-08 21:38 ` MMC quirks relating to performance/lifetime Wolfram Sang
2011-02-09  8:37 ` Linus Walleij
2011-02-09  9:13   ` Arnd Bergmann
2011-02-11 22:33     ` Andrei Warkentin
2011-02-12 17:05       ` Arnd Bergmann
2011-02-12 17:33         ` Andrei Warkentin
2011-02-12 18:22           ` Arnd Bergmann
2011-02-18  1:10       ` Andrei Warkentin
2011-02-18 13:44         ` Arnd Bergmann
2011-02-18 19:47           ` Andrei Warkentin
2011-02-18 22:40             ` Andrei Warkentin
2011-02-18 23:17               ` Andrei Warkentin
2011-02-19 11:20                 ` Arnd Bergmann
2011-02-20  5:56                   ` Andrei Warkentin
2011-02-20 15:23                     ` Arnd Bergmann
2011-02-22  7:05                       ` Andrei Warkentin
2011-02-22 16:49                         ` Arnd Bergmann
2011-02-19  9:54               ` Arnd Bergmann
2011-02-20  4:39                 ` Andrei Warkentin
2011-02-20 15:03                   ` Arnd Bergmann
2011-02-22  6:42                     ` Andrei Warkentin
2011-02-22 16:42                       ` Arnd Bergmann
2011-02-11 23:23     ` Linus Walleij
2011-02-12 10:45       ` Arnd Bergmann [this message]
2011-02-12 10:59         ` Russell King - ARM Linux
2011-02-12 16:28           ` Arnd Bergmann
2011-02-12 16:37             ` Russell King - ARM Linux
2011-02-11 22:27   ` Andrei Warkentin
2011-02-12 18:37     ` Arnd Bergmann
2011-02-13  0:10       ` Andrei Warkentin
2011-02-13 17:39         ` Arnd Bergmann
2011-02-14 19:29           ` Andrei Warkentin
2011-02-14 20:22             ` Arnd Bergmann
2011-02-14 22:25               ` Andrei Warkentin
2011-02-15 17:16                 ` Arnd Bergmann
2011-02-17  2:08                   ` Andrei Warkentin
2011-02-17 15:47                     ` Arnd Bergmann
2011-02-20 11:27                       ` Andrei Warkentin
2011-02-20 14:39                         ` Arnd Bergmann
2011-02-22  7:46                           ` Andrei Warkentin
2011-02-22 17:00                             ` Arnd Bergmann
2011-02-23 10:19                               ` Andrei Warkentin
2011-02-23 16:09                                 ` Arnd Bergmann
2011-02-23 22:26                                   ` Andrei Warkentin
2011-02-24  9:24                                     ` Arnd Bergmann
2011-02-25 11:02                                       ` Andrei Warkentin
2011-02-25 12:21                                         ` Arnd Bergmann
2011-03-01 18:48                                           ` Jens Axboe
2011-03-01 19:11                                             ` Arnd Bergmann
2011-03-01 19:15                                               ` Jens Axboe
2011-03-01 19:51                                                 ` Arnd Bergmann
2011-03-01 21:33                                                   ` Andrei Warkentin
2011-03-02 10:34                                               ` Andrei Warkentin
2011-03-05  9:23                                                 ` Andrei Warkentin
     [not found] ` <201102111551.15508.arnd@arndb.de>
     [not found]   ` <20110308065911.GC1357@ucw.cz>
2011-03-08 14:03     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201102121145.42053.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Sebastian.Rasmussen@stericsson.com \
    --cc=Ulf.Hansson@stericsson.com \
    --cc=andreiw@motorola.com \
    --cc=linus.ml.walleij@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox