![]() |
2012-09-24
, 08:25
|
|
Posts: 326 |
Thanked: 122 times |
Joined on Sep 2012
@ Italy
|
#52
|
I made more advanded tutorial howto enable the unused mtd partition as swap. With this method you can freely still use the mass-storage mode.
Disclaimer: you can brick your device if you don't have opensh and don't follow instructions carefully.
RM696-21-3_PR_001:~# opensh
RM696-21-3_PR_001:~# free
total used free shared buffers
Mem: 1008648 803080 205568 0 33580
-/+ buffers: 769500 239148
Swap: 262136 54012 208124
RM696-21-3_PR_001:/# cp /etc/init/enable-swap.conf /tmp/enable-swap.conf
RM696-21-3_PR_001:/# vi /tmp/enable-swap.conf
# make editions on 2 lines that is mentioned in my earlier patch that I posted here.
RM696-21-3_PR_001:/# cp /tmp/enable-swap.conf /etc/init/enable-swap.conf
RM696-21-3_PR_001:/# export A=`sha1sum /tmp/enable-swap.conf |cut -b1-40`;
RM696-21-3_PR_001:/# perl -pi -w -e 's#40 (.*) A(.*)enable-swap#40 $ENV{A} A$2enable-swap#smg' /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# validator-init; aegis-loader;echo 1 > /sys/kernel/security/validator/flush
RM696-21-3_PR_001:~# reboot
# wait system to reboot and login again:
RM696-21-3_PR_001:~# free
total used free shared buffers
Mem: 1008648 478264 530384 0 24040
-/+ buffers: 454224 554424
Swap: 444664 0 444664
As you can see after reboot you have about 530MB free ram which is 256MB more than before, and swap file is now the 450MB mtd partiotion which was previously unused by the device.
I'm not going to make comparision if onenand mtd partition is faster than mass storage flash partition. If pages are cached in either flash its going to be a bit slower than ramz.
Performance benefit of this is that you have 256MB more ram to play with, and if your not running over 15 apps simultaneously then most likely this increased amount of ram will make your device faster, since its more unlikely that system needs to page your background apps in swap
The Following User Says Thank You to death_jax For This Useful Post: | ||
![]() |
2012-10-07
, 12:12
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#53
|
The Following User Says Thank You to thedead1440 For This Useful Post: | ||
![]() |
2012-10-11
, 18:36
|
Posts: 1,067 |
Thanked: 2,383 times |
Joined on Jan 2012
@ Finland
|
#55
|
![]() |
2012-10-12
, 02:58
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#56
|
~# free total used free shared buffers Mem: 1008108 888448 119660 0 40448 -/+ buffers: 848000 160108 Swap: 422136 13560 408576
# sh /opt/dropcache-mdn/bin/dropcache.sh --3 ~# free total used free shared buffers Mem: 1008108 650764 357344 0 640 -/+ buffers: 650124 357984 Swap: 422136 13560 408576
![]() |
2012-10-12
, 04:45
|
Posts: 1,067 |
Thanked: 2,383 times |
Joined on Jan 2012
@ Finland
|
#57
|
![]() |
2012-10-12
, 11:25
|
|
Posts: 326 |
Thanked: 122 times |
Joined on Sep 2012
@ Italy
|
#58
|
Well it is what it should be, maybe I should explain a bit more if people don't understand the change:
N9 has 1024MB RAM in the device which is valid in both cases.
By default if you don't edit the script, when device boots up, it reserves 256MB of it as ramzswap0, so effectively your device has 768MB of RAM for your application pages and 256MB of swap for compressed pages.
With the edited script you have 1024MB of RAM for your application pages and 422MB of swap for encrypted compressed pages.
You do the math.
PS. running dropcache makes your fileaccess operations slower, so you shouldn't really use that one unless you want to slow your device down.
![]() |
2012-10-12
, 12:10
|
Posts: 1,067 |
Thanked: 2,383 times |
Joined on Jan 2012
@ Finland
|
#59
|
![]() |
2012-10-12
, 12:52
|
|
Posts: 326 |
Thanked: 122 times |
Joined on Sep 2012
@ Italy
|
#60
|
Yes it is normal. It just means that linux system uses more of the free ram in filecache, ie making your load times faster (it automaticly uses less ram for files if free amount drops to certain levels).
Linux holds the most recently used files in the ram cache so subsequential loads of the same files are really fast, if you use dropcache it drops the recently used files out of the ram, and thus if apps loads some files, it needs to access the flash vs ram to load the file, ie it makes loading slower (also affects application startup times). So in short people using dropcache are just newbies
For further reading you should read this: http://www.linuxatemyram.com/
Disclaimer: you can brick your device if you don't have opensh and don't follow instructions carefully.
RM696-21-3_PR_001:~# devel-su
RM696-21-3_PR_001:~# opensh
RM696-21-3_PR_001:~# accli -I |grep tcb-sign
aegis-enabler::tcb-sign <--- If grep doesn't find this line then you have to STOP and not go further.
RM696-21-3_PR_001:~# free
total used free shared buffers
Mem: 1008648 803080 205568 0 33580
-/+ buffers: 769500 239148
Swap: 262136 54012 208124
RM696-21-3_PR_001:/# cp /etc/init/enable-swap.conf /tmp/enable-swap.conf
RM696-21-3_PR_001:/# vi /tmp/enable-swap.conf
# make editions on 2 lines that is mentioned in my earlier patch that I posted here. http://pastebin.com/raw.php?i=8rS81vUX
RM696-21-3_PR_001:/# cp /tmp/enable-swap.conf /etc/init/enable-swap.conf
RM696-21-3_PR_001:/# export A=`sha1sum /tmp/enable-swap.conf |cut -b1-40`;
RM696-21-3_PR_001:/# perl -pi -w -e 's#40 (.*) A(.*)enable-swap#40 $ENV{A} A$2enable-swap#smg' /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# /usr/sbin/validator-init; aegis-loader;echo 1 > /sys/kernel/security/validator/flush
RM696-21-3_PR_001:~# reboot
# wait system to reboot and login again:
RM696-21-3_PR_001:~# free
total used free shared buffers
Mem: 1008648 478264 530384 0 24040
-/+ buffers: 454224 554424
Swap: 444664 0 444664
As you can see after reboot you have about 530MB free ram which is 256MB more than before, and swap file is now the 450MB mtd partiotion which was previously unused by the device.
I'm not going to make comparision if onenand mtd partition is faster than mass storage flash partition. If pages are cached in either flash its going to be a bit slower than ramz.
Performance benefit of this is that you have 256MB more ram to play with, and if your not running over 15 apps simultaneously then most likely this increased amount of ram will make your device faster, since its more unlikely that system needs to page your background apps in swap
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.
Last edited by rainisto; 2013-02-05 at 21:59.