maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Swapfile - what's the best solution (https://talk.maemo.org/showthread.php?t=51485)

rolandw 2010-04-30 13:22

Swapfile - what's the best solution
 
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- 2010-04-30 13:46

Re: Swapfile - what's the best solution
 
Quote:

Originally Posted by rolandw (Post 635010)
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...

Quote:

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.

Quote:

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

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.

fhofer 2010-04-30 13:53

Re: Swapfile - what's the best solution
 
What swapiness setting do you recommend?

grog 2010-04-30 17:17

Re: Swapfile - what's the best solution
 
Is there an app-setting that you can set swap or would it be command-line only?

shadowjk 2010-05-01 17:03

Re: Swapfile - what's the best solution
 
There's no GUI App for it.


All times are GMT. The time now is 23:53.

vBulletin® Version 3.8.8