Reply
Thread Tools
Posts: 5 | Thanked: 0 times | Joined on Feb 2010 @ London
#1
My N900 appeared sluggish especially with multiple apps open and suddenly started to grind to a halt to such an extent that it needed a reboot. I started to investigate and then noticed in Conky that there was no swap file. I thought that that was wrong and delved into free and confirmed, no swapfile in use. By examining /dev and /etc/tstab I could see that there was a swap partition on the eMMC and one on my microSD which I'd created when I formatted it. Somehow swap got turned off and clearly there was a missing startup script on my device to turn it on at every boot (now rectified!).

Now there should be a swapfile on the eMMC because the device should run without a microSD card in it so it should be designed to work. However, we know that the life of microSD and eMMC is pretty limited in terms of endless writes. Therefore:
  • Where is the best place to have the swapfile?
  • Would it not be better to put the swapfile on the microSD card and just replace it when it becomes tired rather than risk the whole device dying due to tired on-board memory?
  • If it is on the microSD card, is there an optimum size?
  • Am I worrying needlessly?

TIA
 
juise-'s Avatar
Posts: 186 | Thanked: 192 times | Joined on Jan 2010 @ Finland
#2
Originally Posted by rolandw View Post
Where is the best place to have the swapfile?
I keep mine on the microSD, since I feel the device keeps responsive that way. Having the swap on eMMC seems to make it laggy after a few days uptime.

Of course, having swap on microSD means that one must manually switch the swap back to internal flash before switching cards...

Would it not be better to put the swapfile on the microSD card and just replace it when it becomes tired rather than risk the whole device dying due to tired on-board memory?
I think that excessive writes would only kill that single block, and not affect the rest of the device. Also, there's likely some wear leveling logic in the flash controller, so the wear effect will be spread around the media. Most likely you will be getting a new phone before wear becomes an issue.

If it is on the microSD card, is there an optimum size?
Exactly the amount you need .

Seriously, that really depends on what you are doing. I've never seen more than 180Mb used swap on my N900, but I don't try to do anything too memory heavy on it either. The default 768Mb should be enough for most purposes.
 
Posts: 66 | Thanked: 30 times | Joined on Feb 2010
#3
What swapiness setting do you recommend?
 
grog's Avatar
Posts: 546 | Thanked: 85 times | Joined on Feb 2008 @ Winnipeg, Canada
#4
Is there an app-setting that you can set swap or would it be command-line only?
__________________
GROG!
N900 | ZAGG Body Armour | 16Gb A-DATA micro-sd
N810 | 2 x Patriot 8gb mini-SD | Boxwave Crystal Clear SS | Black Aluminum case | OTG dongle
N800 | 2 x 8gb OCX SD | Boxwave Anti-glare SS | PDAir book-style case
Holux M-1200 bluetooth GPS | iGo 4-row bluetooth keyboard | Linksys USB 10/100 ethernet | Plantronics Voyager 855 BT Headset
 
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#5
There's no GUI App for it.
 

The Following User Says Thank You to shadowjk For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 00:32.