Reply
Thread Tools
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#101
True a GUI would be good that's why I started one, but it needs a lot of work.

Automatic Re-swapping can cause problems if your in the middle of something.

My method has a separate event.d file (which I personally prefer over editing rcS-late)

The two scripts you mention in your method are the same as Ereswap (currently in devel) wiki.maemo.org/Ereswap

My method has one script to switch swap (automatically forcing onto uSD if not already)
The other script is to switch to internal swap so the uSD/back cover can be removed.
If you have Swap on uSD removing the back cover will (in the words of vi_) insta-unmount your swap, which is like pulling a RAM stick out of a desktop. My script is useful for if I need to get in the back while powered up.

IIRC (from something I read on TMO) the swapon/swapoff is better done with the N900 unlocked.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Posts: 78 | Thanked: 24 times | Joined on Feb 2012 @ Moscow
#102
Originally Posted by peterleinchen View Post
I do not have the truth for you, just assumption, that disabling eMMC swap for some N900s leads to unpredictable behaviour.
Please see my posts in compcache/ramzwap thread.
Thanks. But glitch is disappears after setting 768 mb swap partition on SD.
Was 384.
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#103
But there is no reason for "glitch" to disappear
I have atm another SD card with real partition and my glitch appeared again once, but only once. It is a class 2 card, whereas the other was/is a class4.
So totally confusing...
 
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#104
Originally Posted by OMOIKANE View Post
Thanks. But glitch is disappears after setting 768 mb swap partition on SD.
Was 384.
Originally Posted by peterleinchen View Post
But there is no reason for "glitch" to disappear
I have atm another SD card with real partition and my glitch appeared again once, but only once. It is a class 2 card, whereas the other was/is a class4.
So totally confusing...
Fremantle was designed to run with 1 gb ram, if OMOIKANE had 384 swap, it was 640mb alltogether, I think this was the case (as changing it back to 768 = 1gb alltogether) made it work again.
 

The Following 3 Users Say Thank You to misiak For This Useful Post:
Posts: 78 | Thanked: 24 times | Joined on Feb 2012 @ Moscow
#105
Originally Posted by peterleinchen View Post
But there is no reason for "glitch" to disappear
I have atm another SD card with real partition and my glitch appeared again once, but only once. It is a class 2 card, whereas the other was/is a class4.
So totally confusing...
I dunno why but 384 and 512 linux-swaps leads to that glitch - "appname-resuming" on top and reloading the page.
My sdcard is class 10.
Also I can open (with 384 mb swap) 8-9 pages only in microb. After that system tells me about "pause and low memory". But conky shows about 100 mb of swap usage.
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#106
It's seems silly to make your swap smaller than the standard 768mb.

I would be using between 3-4 times RAM amount upto 4GB swap, then on larger desktops over 4GB, 1:1 ratio is usually more than enough.

Too much and too little will only cause problems.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#107
This is known glitch - 600 or more swap is sufficient for having everything working OK, but no less.

Of course, using 1.5GB swap (or more) makes it *much* more comfortable, as times between required reswaps increase considerably.

BTW, I've just grasped real SanDisk class 4 microSD 32GB (for 17 USD ), so I'm going to exploit big swaps very soon

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 2 Users Say Thank You to Estel For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#108
ORLY?

Did not know that, thanks. Some more info/link to that?

But it does not explain my SGX-alike UI-total-freezes, as I always had 768 MB on SD. And these freezes just came up when I had my eMMC swap fully disabled. Now I again have it online with lesser priority and everything is fine again (yippie).
Code:
~# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/mmcblk0p3                          partition	786424	12680	-1
/dev/mmcblk1p3                          partition	786424	261084	2
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#109
Originally Posted by peterleinchen View Post
Sure there is. Here, for your convenience
Code:
if [ `id -u` != 0 ] ; then
       exec sudo gainroot <<EOF
exec sh $0 $*
EOF
       exit $?
fi
Thanks had to make a small change to get it working tho.

Code:
if [ `id -u` != 0 ] ; then
       exec | sudo gainroot <<EOF
exec sh $0 $*
EOF
       exit $?
fi
Updated my scripts on the discussion page
Although this "gainroot" script seems to make the banner repeat twice on the eject sd script, not sure how to fix.

I don't think large swaps have a benefit.
When fragmentation occurs, swapoff will take forever.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#110
@sixwheeledbeast

Did not yet check your scripts completely, but for the multiple banner I do have explanation:
please check out last line of my template
Code:
#!/bin/sh
# executing a shell script given as parameter(s) as root

if [ `id -u` != 0 ] ; then
       exec sudo gainroot <<EOF
exec sh $0 $*
EOF
       exit $?
fi

# own shell code from here
You have to type your code below that line, as this will detect if you already have root privileges or not and call the script again with su privileges. so everything above that will be executed twice.

And for need to change the code by you. I never had the need as i always followed the above rule. So change back, put everything below and test again.

About
I don't think large swaps have a benefit.
When fragmentation occurs, swapoff will take forever.
I think you are wrong. Only amount of swap data in use, i.e. what conky (cat /proc/swaps) shows, will be moved. So bigger swap parts will help to minimze swap refresh actions, as time until fragmentation starts, will increase.
(did not test yet, but am pretty sure)
 

The Following 6 Users Say Thank You to peterleinchen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:59.