Active Topics

 


Reply
Thread Tools
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#1
i believe that linux should have some swap, maybe not 2GB (i use one GB) but, it should have some space for this.
especially, it's not big deal if mass storage is in some other file system than FAT.
related to:
https://www.linux.com/news/software/...ux-swap-space/
i've made some little tests and i think so far there's lot of ways to speed up phone little bit and this is one of first steps.

this is only for super advanced users and no one is responsible if you damage anything with this, it's also only for those who don't connect phone to mass storage very often.


it's important to note that swap is not replacement for RAM and it will not make "visible" changes to your device (like more ram....)
so, here we go:
need: sudo package and probably open mode kernel?

Code:
$ sudo su
# dd if=/dev/zero of=/home/user/MyDocs/.swap0 bs=1024 count=2097152
# mkswap /home/user/MyDocs/.swap0
# swapon /home/user/MyDocs/.swap0
Code:
free
Code:
/etc/init/apps/swapp-add.conf
Code:
description "additional swap file for harmattan"
author "wook dot ba at gmail dot com"
stop on stopping xsession
console none
respawn
nice 2

env DISPLAY=:0.0

pre-start script
    swapon /home/user/MyDocs/.swap0
end script
download swap-add.conf

little automatization:

scripts for "quick" add/rem /home/user/MyDocs/.swap0:
copy them to /sbin/ or /bin/ or /usr/bin and do:
Code:
#chmod +x setswap0
#chmod +x rmswap0
download setswap0
download rmswap0

###############

additional notes:
line dd if=/dev/zero of=/home/user/MyDocs/.swap0 bs=1024 count=2097152 means: fill /home/user/MyDocs/.swap0 with zeros in block size 1024 for 1024*2048 so maybe you will want to replace it with 1024*1024 (1048576)

to view swap files use:
# cat /proc/swaps
to view memory:
$ free

only for advanced users!!!
__________________
~ # mv /usr/bin/smartsearch /usr/bin/stupidsearch

Last edited by wook_sf; 2012-09-10 at 10:14.
 

The Following 8 Users Say Thank You to wook_sf For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#2
works well here

Just hope AMD comes and tries this out too... That would make it so fun...Haha
 

The Following 4 Users Say Thank You to thedead1440 For This Useful Post:
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#3
thanks for report :P

hahahahaha well, we'll send him to Arie :P but, you should explain procedure to him
__________________
~ # mv /usr/bin/smartsearch /usr/bin/stupidsearch
 

The Following User Says Thank You to wook_sf For This Useful Post:
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#4
Running swap on flash of course kills the flash memory at some point. Just a word of caution.

But having said that, I have always wondered why nobody has enabled the near 500MB extra mtd block device that is unused on the Harmattan devices. ;-)

I give this as a hint: /etc/init/enable-swap.conf (with couple changes (remember to resign hashlist or you malf your device) you can gain 256MB more free ram (when disabling ramz) and gain almost 500MB swap). And it doesn't mess your mass storage size.
__________________
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; 2012-09-10 at 19:39.
 

The Following 3 Users Say Thank You to rainisto For This Useful Post:
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#5
Originally Posted by rainisto View Post
Running swap on flash of course kills the flash memory at some point. Just a word of caution.

But having said that, I have always wondered why nobody has enabled the near 500MB extra mtd block device that is unused on the Harmattan devices. ;-)

I give this as a hint: /etc/init/enable-swap.conf (with couple changes (remember to resign hashlist or you malf your device) you can gain 256MB more free ram (when disabling ramz) and gain almost 500MB swap). And it doesn't mess your mass storage size.
well, eventually it will be dead anyway it can't last for ever though, but that's really good idea and i'll give it a try, though i am very newbie into nux under core and i was always wondering why there's no much tweaks/mods....either everyone is happy with phones, or ...
thanks for this hint
__________________
~ # mv /usr/bin/smartsearch /usr/bin/stupidsearch
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#6
My output of free:

Code:
RM696-21-3_PR_005:~# free
                total              used            free       shared      buffers
Mem:       1008108       908720        99388            0        44816
-/+ buffers:             863904       144204
Swap:      2359280       12264           2347016

Last edited by thedead1440; 2012-09-14 at 16:43.
 

The Following User Says Thank You to thedead1440 For This Useful Post:
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#7
Originally Posted by thedead1440 View Post
My output of free:

Code:
RM696-21-3_PR_005:~# free
                total              used            free       shared      buffers
Mem:       1008108       908720        99388            0        44816
-/+ buffers:             863904       144204
Swap:      2359280       12264           2347016
huh, it looks to me like DDoS from somewhere
2347016 in swap....i am wondering what's there :S
__________________
~ # mv /usr/bin/smartsearch /usr/bin/stupidsearch
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#8
oh wook all dead parrots in there
 

The Following 2 Users Say Thank You to thedead1440 For This Useful Post:
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#9
Originally Posted by thedead1440 View Post
oh wook all dead parrots in there
ahahahaha, kill em all
__________________
~ # mv /usr/bin/smartsearch /usr/bin/stupidsearch
 

The Following User Says Thank You to wook_sf For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#10
Originally Posted by rainisto View Post
Running swap on flash of course kills the flash memory at some point. Just a word of caution.

But having said that, I have always wondered why nobody has enabled the near 500MB extra mtd block device that is unused on the Harmattan devices. ;-)

I give this as a hint: /etc/init/enable-swap.conf (with couple changes (remember to resign hashlist or you malf your device) you can gain 256MB more free ram (when disabling ramz) and gain almost 500MB swap). And it doesn't mess your mass storage size.

I guess you mean mtd6 block?
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:06.