SD card unpartitioned space -- used for swap?

C. Scott Ananian cscott at
Mon Nov 22 18:50:35 EST 2010

On Mon, Nov 22, 2010 at 6:43 PM, Mikus Grinbergs <mikus at> wrote:
> If "indistinguishable" is true, then there is as much wear to the SD
> card from one file-block written as there is from one swap-block
> written.


>  I have no measurements whatsoever - but my gut feel is that
> the majority of my SD card writes are for file-blocks.  If that happens
> to be the case, then writes to swap space are a minor wear contributor.

Measurements are always helpful.

> Also, I'm not familiar with "evil keepout time".  But note that on the
> new XO-1 F14 build, the "shutdown" time-lapse is only a few seconds.
> If actually 30s are needed to keep the SD circuitry happy, perhaps a
> delay (and a Release Notes explanation) should be added to the OLPC.

This is an issue with particular brands of SD cards.  It's not an XO
issue, per se.

>> To advance the discussion, collecting a quantitative measure
>> of "average swap writes per day" given some usage profile would let
>> you more-or-less rigorously determine whether swap was 'safe' over the
>> 5 year expected lifetime of the device.
> Note:  I'm using an external SD card.  So if it fails before the OLPC
> itself fails, I can at reasonable expense replace this swap device -- I
> don't have to plan for a definite wear lifetime.

Are you making regular backups?

>> If you started
>> collecting/recording total data written to your swap partition, I'd be
>> very interested to hear (in a month or so) what your numbers were.
> I'm NOT into instrumentation.  Please help me in locating software that
> will collect the number of swap (and file) writes to a physical device
> -- but it must be software that is simple_for_me_to_install_on_OLPC.
> [For persistence, the output of that software needs to go to the SD.]

The contents of /proc/diskstats seem to contain the interesting info.
describes their interpretation.  A user-friendly script would probably
live in /etc/init.d and record the relevant information from
/proc/diskstats at shutdown time.

                         ( )

More information about the Devel mailing list