View Single Post
pichlo's Avatar
Posts: 6,450 | Thanked: 20,983 times | Joined on Sep 2012 @ UK
#3
Originally Posted by Hacker View Post
My N9 is fastest in every way when swap memory usage is lowest. Emails swipe faster, homescreens swipe faster, and I think that swap-related slowdown is one of the primary reasons N9 owners are rebooting all of the time--because rebooting resets the swap memory.
I thought the whole idea of swapping is to put the less used memory blocks out of the way but have them ready when needed. Resetting the swap would mean that the next time the memory block is needed, it will have to be reinitialized again which is slower than fetching it from the swap. It is true that the swap space may become fragmented in which case a reset may help a little but you will get a better performance boost by closing applications to reduce the absolute memory usage.

How can we reset the swap memory as if we had rebooted without actually rebooting? After looking and searching I have yet to find an answer.
Have you found this?

http://talk.maemo.org/showthread.php?t=84007

You can reset the swap by running (as root)
Code:
swapoff -a
swapon -a
I won't recommend it though. I don't have an N9, but on my N900 this takes a LONG time (minutes) and results in some background tasks forcibly closed as they can't allocate memory while the swap is off.

A better solution would be having TWO swap spaces and from time to time swap (no pun intended) between them. This has been discussed a number of times. See e.g.

http://talk.maemo.org/showthread.php?t=42357
http://talk.maemo.org/showthread.php?t=84296
http://talk.maemo.org/showthread.php?t=86752

...and many others. Some of them discuss the N900 but the solution is actually the same for the N9.
 

The Following 3 Users Say Thank You to pichlo For This Useful Post: