View Single Post
Posts: 75 | Thanked: 125 times | Joined on Nov 2008
#65
Originally Posted by pycage View Post
Swap used after powering up is caching. Linux swap doesn't work like Windows swap which is only used when memory gets full. Using swap for cache can help increase responsiveness. The sluggishness begins when some memory pages of active applications get swapped out. But when this happens you know that you wouldn't have got that far without swap space.
pycage I think you're wrong here. Swap on Linux purely swaps out the least-often-accessed pages of memory in preference for file cache according to the settings in /proc/sys/vm (especially the setting "swappiness" - incidentally, why oh why oh why is this set at "100" by default ? Nobody knowledgeable so far afaik has been able to give any plausible explanation for this.. ).

In any case: supposing you're correct and its "for caching" as you say. Is it therefore caching from fast flash (256MB NAND root filesystem) to slow flash (mmcblk0p3) ???! This defeats the purpose of a cache (ie the purpose of speeding up access to a slow medium) - it would be better no not cache to the slower medium at all.

Indeed no - its not swapping for caching; it seems to be swapping out of necessity. The processes are malloc'ing more memory than the device physically has. Have a look at the output of "ps aux" and add up the VSZ column. Have a look at the output of "free". If it's swapping for caching purposes then try this: disable swap and see if your phone doesn't crash hard: "sudo swapoff /dev/mmcblk0p3"

Am I wrong?

so, can we disable compositing? Can we disable virtual desktops? Can we disable the media indexer. Would any of this help to reduce the amount of memory consumed by standard processes in maemo 5? If anyone has any hints or tricks they've found, feel free to share them here!

Edit: pycage - did you mean "process data in memory can be swapped out so that the then free RAM (ultra fast) can be used for file cache" ? Upon second reading it occurred to me that this is what you may have meant by "swap is used for cache" (which is technically incorrect)

Last edited by jabawok; 2010-02-23 at 09:49.
 

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