[Om2008.12] Adding swap space can stop app crashes

Carsten Haitzler (The Rasterman) raster at rasterman.com
Sat Jan 17 01:43:37 CET 2009


On Sat, 17 Jan 2009 11:03:03 +1100 Chris Samuel <chris at csamuel.org> babbled:

> On Sat, 17 Jan 2009 10:14:53 am Nick Van Fossen wrote:
> 
> > So, I'm a bit lazy so instead of going through the trouble of adding a swap
> > partition, I just created a swap file.
> 
> I would say that you're not necessarily being lazy there, if you configure a 
> swap partition then you are limiting where the kernel can write bytes on the 
> SD card which will lead to uneven wear on it.
> 
> In future with a COW SSD aware wear-leveling filesystem like btrfs a swap
> file may end up being more SD friendly as the filesystem may (hopefully!)
> balance out those writes across the card.

as such the sd-card should be doing wear-levelling for you as it maps logical
to physical addresses and has an erase pool with extra blocks to play with. it
can be "improved" by a better fs aware of the algorithms that card uses - but
each card may be different depending on maker... wear-levelling is part of the
spec for sd and hidden behind the sd access interface - so card manufacturer
will determine quality of this... so spend your money wisely and get a good
reputable sd card from the major names that come with lifetime warranties.

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at rasterman.com





More information about the community mailing list