SD card unpartitioned space -- used for swap?

Mikus Grinbergs mikus at
Mon Nov 22 18:43:18 EST 2010

> Assuming OLPC isn't using TRIM support on the SD cards, writes to the
> swap space are indistinguishable from writes to any other space on the
> card.  That means that writes to the swap "partition" could potentially
> corrupt other data on the card, especially if it occurs less than 30s
> before removal of power (or whatever that evil keepout time is).

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.

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.

> 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.

> 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.]


More information about the Devel mailing list