View Single Post
Posts: 324 | Thanked: 739 times | Joined on Jun 2009 @ São Paulo, Brazil
#19
Originally Posted by Dragoss91 View Post
Sounds good , I've installed it and I made sure it's loaded by rebooting the phone .
No reboot needed, but maybe rebooting it would help to compare with the old behavior.

Originally Posted by Dragoss91 View Post
Could you also explain a bit what your package does ?

Later edit : I've unpacked the .deb file and looked in fastern9.sh , your tweak seems to be like swappolube on n900 , if these tweaks worth maybe someone will make a UI .
I'll just paste the new version of the script here (it includes explanations) in case anyone is interested. Will create another thread for the package.

Code:
#!/bin/sh
#

#Author: Danilo Luvizotto <danilo.luvizotto@gmail.com>
#License: do whatever you want with it.

#This is mainly a memory MOD. The idea is to avoid swapping.
#Swapping will cause the process to freeze while waiting
#data to be available in RAM. In our case it will also waste
#battery because the swap is compressed in N9.
#
#I've read a lot of documentation to get to the conclusions
#and explanations detailed here, but I may be wrong. If you're
#an expert and something is wrong, please let me know.

#If you want to learn about about cgroups, this is the best
#documentation I've found:
#http://docs.redhat.com/docs/en-US/Re...ide/index.html
#Beware some parts are specific to Red Hat Enterprise Linux.

#Source: http://www.kernel.org/doc/Documentation/sysctl/vm.txt
#
#vfs_cache_pressure controls the tendency of the kernel to
#reclaim the memory which is used for caching of directory
#and inode objects.
#At the default value of vfs_cache_pressure=100 the kernel
#will attempt to reclaim dentries and inodes at a "fair" rate
#with respect to pagecache and swapcache reclaim.  Decreasing
#vfs_cache_pressure causes the kernel to prefer to retain dentry
#and inode caches.
#
#This is a mobile phone, we want applications to be available in
#RAM, so we prefer pagecache and swapcache, not directory and
#inode cache. We don't want applications to freeze while their
#code come back from swap!
echo 2097151 > /proc/sys/vm/vfs_cache_pressure

#This will make the system less proactive moving data to swap.
#The value '3' worked better in my tests.
echo 3 > /proc/sys/vm/swappiness

#This will limit memory used by background processes to 10MB.
#The default value is arround 70MB.
#In my phone only 3 processes are in this group:
#msyncd, obexd and the infamous smartsearch
while [[ `cat /syspart/system/background/memory.limit_in_bytes` != 10485760 ]]
do
	echo 10M > /syspart/system/background/memory.limit_in_bytes
	sleep 5
done
#This will make background processes to have less CPU priority.                             
echo 128 > /syspart/system/background/cpu.shares

#This will limit memory used by desktop processes to 100MB.
#The default value is 200MB.
#The most important process in this group is meegotouchhome,
#to wich the 3 home views belong.
#At fist I thought performance would be better if this group
#has a higher limit, but it makes no difference. High limits
#will cause processes to swap, so performance will decrease.
while [[ `cat /syspart/system/desktop/memory.limit_in_bytes` != 104857600 ]]
do
        echo 100M > /syspart/system/desktop/memory.limit_in_bytes
	sleep 5
done
Edit: the package is here.

Last edited by traysh; 2012-04-28 at 04:56.
 

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