View Single Post
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#20
Originally Posted by Hacker View Post
I still find it strange that things are this way, but c'est la vie avec N9.
Maybe this is a wild shot, but I just re-read above that the N9 has 768MB *RAM* and 256MB *SWAP*.

If so, I've read somewhere (maybe not even applicable anymore) that anonymous memory (backed by swap, not by file, e.g. malloc()'d memory) cannot be reclaimed unless it can be moved to swap (?).

Meaning if your swap is too small to even hold a copy of the RAM, then you may actually have memory blocks which *could* be freed which are not been free'd because of lack of swap (???).

Besides, it may be that many programs overcommit memory. When a program "reserves" a chunk of memory, that memory is reserved from swap. The memory is only really allocated when it's used.

Meaning, if you have little swap (and the N9 has too little), there may be programs which cannot reserve memory (even if it's available), only because of lack of sufficient swap.

The only advice I can give is:

1. Increase your swap (if partitioning is a problem with the N9, just make a swap file).

2. Decrease your swappiness (e.g. echo 20 > /proc/sys/vm/swappiness).

3. Increase VFS cache pressure (e.g. echo 200 > /proc/sys/vm/vfs_cache_pressure). This way cache is reclaimed when necessary (instead of swapping out programs).

Other things that could help would be e.g. reducing M_MMAP_THRESHOLD and/or M_TRIM_THRESHOLD (at least for long-running programs). But I don't know what the default values are on the N9 (nor on the N900 for that matter).
 

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