View Single Post
pichlo's Avatar
Posts: 6,450 | Thanked: 20,983 times | Joined on Sep 2012 @ UK
#10
Originally Posted by Hacker View Post
Originally Posted by TMavica View Post
Swap memory cant be free up except booting, only way is to add more swap memory from 255 to 412
Why? This seems so strange . . . Please help me understand. Is it a bug?
Look at these figures:
Code:
N900:~# free
             total         used         free       shared      buffers
Mem:        235252       232012         3240            0         1784
-/+ buffers:             230228         5024
Swap:       786424        71540       714884
Of course they will be different on your N9 or even on the next guy's N900, but the idea is the same. The total used memory (main + swap) is higher than the amount of available main memory. Which means some pages have to be swapped. The only way to get around this is by increasing the amount of main memory, which is clearly not possible.

One way of reducing the impact of swapping is spreading the bandwidth, such as one swap partition in the device and one on the SD card, as discussed in those threads that I linked in my first reply.

EDIT: I am actually a bit surprised how much main memory is used before swapping occurs (or how little main memory is left free). My gut feeling would be to strive for at least 20% slack, which would mean even more swap usage. Obviously the Hildon programmers knew better.

Last edited by pichlo; 2013-03-21 at 20:25.