Re: [Om2008.12] Adding swap space can stop app crashes
Nick Van Fossen wrote: Just as a helpful note, adding swap space seems to help against application crashes. I've always had issues with tangoGPS and the various webbrower apps crashing. Looking into it a little more I notice that this was occurring when the puny 128MB of memory was getting filled up. So, I added a swap file onto my microSD card and have had these problems practically clear up. Anyone else had any similar experiences? If this is a true fix this should probably go onto the wiki. I have a 128MB swap partition on the microsd. This works fine, currently using 10M of swap with 3 days of uptime. So I currently have 10M more available for cache and programs than I otherwise might. Using some swap may speed up stuff as well. When memory gets tight, linux have a choice between swapping out little-used data, throwing away some file cache, or throwing out stuff that can be reloaded (such as the code in your binaries.) Without swap, linux can only throw out file cache and binaries. Even if there is some really old unused data around. Data cannot be discarded unless there is somewhere to put it - i.e. the swap partition. Helge Hafting ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
Nick Van Fossen wrote: Just as a helpful note, adding swap space seems to help against application crashes. I've always had issues with tangoGPS and the various webbrower apps crashing. Looking into it a little more I notice that this was occurring when the puny 128MB of memory was getting filled up. So, I added a swap file onto my microSD card and have had these problems practically clear up. Anyone else had any similar experiences? If this is a true fix this should probably go onto the wiki. I can agree with your findings. I also use a swap file with debian because without it freezes quite a lot when starting many applications and the memory got filled up. But i only added 64MB of swap and that is enough to never got debian freeze again. :) Ciao, Rainer ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Sat, 17 Jan 2009 6:21:10 pm Carsten Haitzler wrote: i can keep hunting down more references - but its meant to be part of the spec. cards should do it - some may do it better than others (ie name brands - cost more, lifetime warranties), and some el-cheapo ones may skip it to cut costs. All very useful information, thanks so much! -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP signature.asc Description: This is a digitally signed message part. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Saturday 17 Jan 2009 12:51:10 pm Carsten Haitzler wrote: On Sat, 17 Jan 2009 11:31:35 +0530 Kishore kitts.mailingli...@gmail.com babbled: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv016.cgi?read=92882 (search for wear levelling - message # 4): Part of the SD spec is something called wear leveling. This attempts to spread writes out to previously unused physical sectors and maps them to their proper logical sector number. Properly implemented, you wont wear out a fixed directory sector. The spec and flash chips also supports bad block replacement. even openmoko's wiki: http://wiki.openmoko.org/wiki/Booting_from_SD SD cards are supposed to support wear leveling, but this can not be guaranteed for all vendors. :) i can keep hunting down more references - but its meant to be part of the spec. cards should do it - some may do it better than others (ie name brands - cost more, lifetime warranties), and some el-cheapo ones may skip it to cut costs. Thanks for the information. With such widespread use of USB flash drives which are really cheap and of large capacities I guess the technology has gotten cheaper. I recollect that the concept was called flash translation layer or something like that. Anyway, it also justifies the higher price paid for the bigger brands. A good reason for me to recommend the bigger brands over the many other cheaper ones in the market! :) On Saturday 17 Jan 2009 6:13:37 am Carsten Haitzler wrote: 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. Are you sure of this? I remember from a few years back for a project at work it was understood that compact flash was the only card that did wear levelling internally and that is why it also was so much more expensive. I know most of USB memory sticks do it these days so it cant be that expensive any more. If true then this is really good news. One will not need to bother too much with having to use a file system which does wear levelling for any project that uses a SD card. -- Cheers! Kishore signature.asc Description: This is a digitally signed message part. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Sat, 17 Jan 2009 17:29:12 +0530 Kishore kitts.mailingli...@gmail.com babbled: even openmoko's wiki: http://wiki.openmoko.org/wiki/Booting_from_SD SD cards are supposed to support wear leveling, but this can not be guaranteed for all vendors. :) i can keep hunting down more references - but its meant to be part of the spec. cards should do it - some may do it better than others (ie name brands - cost more, lifetime warranties), and some el-cheapo ones may skip it to cut costs. Thanks for the information. With such widespread use of USB flash drives which are really cheap and of large capacities I guess the technology has gotten cheaper. I recollect that the concept was called flash translation layer or something like that. Anyway, it also justifies the higher price paid for the bigger brands. A good reason for me to recommend the bigger brands over the many other cheaper ones in the market! :) as such built-in flash (nand - not sd-on-chip) doesn't have this. thus jffs2, ubifs and freinds are needed to move the wear-levelling into os/cpu space. you may still be thinking of that. i know years ago i was doing an arm based webpad project .. of course os on flash. during development we weren't using jffs2 - using ext2... in the space of a few months of development and fiddling with the fs - we burnt through the write cycle limit. but this was long ago when write-cycles limits were 1/100th of what they are now. and it was silly using ext2 - but never got to changing it to jffs2 etc. before the project was cancelled. :) thank god several prototypes were floating about :) so back then - if you did ext2/3 on a raw flash (mtd) device. woe betide ye who did. these days on sd etc. it's taken care of ... or SHOULD be. but quality... is what you pay for :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
[Om2008.12] Adding swap space can stop app crashes
Just as a helpful note, adding swap space seems to help against application crashes. I've always had issues with tangoGPS and the various webbrower apps crashing. Looking into it a little more I notice that this was occurring when the puny 128MB of memory was getting filled up. So, I added a swap file onto my microSD card and have had these problems practically clear up. Anyone else had any similar experiences? If this is a true fix this should probably go onto the wiki. So, I'm a bit lazy so instead of going through the trouble of adding a swap partition, I just created a swap file. My microSD card is mounted at /media/nickcard so change the below accordingly. I set mine up for 1GB, but that seems like way overkill, so here is a quick command list to create a 1/2GB swap. Create the swap file on the mounted microSD card (count is the number of megabytes, change accordingly): dd if=/dev/zero of=/media/nickcard/swapfile.img bs=1024k count=512 Format the swap file: mkswap /media/nickcard/swapfile.img Add the swap file to your running system: swapon /media/nickcard/swapfile.img use free -m to verify that the swap is going Now like I said I am lazy, so I didn't want to bother remembering how fstab worked so that it would auto-start that way, so I just added that last command to the startup. I read that you would just add /media/nickcard/swapfile.img none swap sw 0 0 to /etc/fstab but don't sue me if that part don't work. :) -Nick _ Windows Liveā¢: Keep your life in sync. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_012009___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
2009/1/17 Nick Van Fossen stix...@hotmail.com: Just as a helpful note, adding swap space seems to help against application crashes. I've always had issues with tangoGPS and the various webbrower apps crashing. Looking into it a little how were you getting tangogps to crash, it's probably the most stable app i've used on the freerunner? were you recording gps tracks for many hours? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
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 filsystem like btrfs a swap file may end up being more SD friendly as the filesystem may (hopefully!) balance out those writes across the card. cheers, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP signature.asc Description: This is a digitally signed message part. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Fri, Jan 16, 2009 at 7:03 PM, Chris Samuel ch...@csamuel.org wrote: 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 filsystem like btrfs a swap file may end up being more SD friendly as the filesystem may (hopefully!) balance out those writes across the card. I saw this project some time ago. It seems nice but I don't know if it can be useful for you. I tested with an old laptop I had (X86) and it worked well. About 7 months ago the author said he had crashes in ARM arch ... I did not test and I do not know whether the crashes were fixed. http://code.google.com/p/compcache/ N.- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Sat, 17 Jan 2009 11:03:03 +1100 Chris Samuel ch...@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)ras...@rasterman.com ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Saturday 17 Jan 2009 6:13:37 am Carsten Haitzler wrote: 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. Are you sure of this? I remember from a few years back for a project at work it was understood that compact flash was the only card that did wear levelling internally and that is why it also was so much more expensive. I know most of USB memory sticks do it these days so it cant be that expensive any more. If true then this is really good news. One will not need to bother too much with having to use a file system which does wear levelling for any project that uses a SD card. -- Cheers! Kishore signature.asc Description: This is a digitally signed message part. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.12] Adding swap space can stop app crashes
On Sat, 17 Jan 2009 11:31:35 +0530 Kishore kitts.mailingli...@gmail.com babbled: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv016.cgi?read=92882 (search for wear levelling - message # 4): Part of the SD spec is something called wear leveling. This attempts to spread writes out to previously unused physical sectors and maps them to their proper logical sector number. Properly implemented, you wont wear out a fixed directory sector. The spec and flash chips also supports bad block replacement. even openmoko's wiki: http://wiki.openmoko.org/wiki/Booting_from_SD SD cards are supposed to support wear leveling, but this can not be guaranteed for all vendors. :) i can keep hunting down more references - but its meant to be part of the spec. cards should do it - some may do it better than others (ie name brands - cost more, lifetime warranties), and some el-cheapo ones may skip it to cut costs. On Saturday 17 Jan 2009 6:13:37 am Carsten Haitzler wrote: 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. Are you sure of this? I remember from a few years back for a project at work it was understood that compact flash was the only card that did wear levelling internally and that is why it also was so much more expensive. I know most of USB memory sticks do it these days so it cant be that expensive any more. If true then this is really good news. One will not need to bother too much with having to use a file system which does wear levelling for any project that uses a SD card. -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community