Reply
Thread Tools
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#201
I was configuring my new 3.1 kernel just a while ago.
This piqued my interest, and it looks better than what we have now. Can it be backported?

EDIT: Looks like cleancache needs to be backported, too.

On a side note, IIRC the onboard UBIFS filesystem uses lzo1x compression, so we'll take another, small performance hit as a tradeoff for more memory squeezed in on the 256MB chip.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.

Last edited by Hurrian; 2011-12-08 at 22:59.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#202
Thanks for sharing, but what the hell UBIFS have to do with RAM? UBIFS is used on 256 MB NAND flash, and zram/etc use RAM for swap. It seems, that Your finding do the same.

Obviously, NAND != RAM

/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!
 
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#203
Originally Posted by Estel View Post
Thanks for sharing, but what the hell UBIFS have to do with RAM? UBIFS is used on 256 MB NAND flash, and zram/etc use RAM for swap. It seems, that Your finding do the same.

Obviously, NAND != RAM

/Estel
I meant that UBIFS (as it's used on the N900) and zcache both use lzo1x compression. So if ZCACHE=Y in the kernel, we're going to take a small CPU overhead (~3% at 600MHz?) working with it.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Raimu's Avatar
Posts: 139 | Thanked: 181 times | Joined on Nov 2011 @ Oulu, Finland
#204
Hmm, I'm interested. When we say compcache, is there a difference to what is now known as zram? Apparently the later builds of compcache started using the name zram, and ramzwap.ko was renamed zram.ko ... is there anything that would stop using zram instead of older versions on the n900?

Last edited by Raimu; 2012-04-19 at 15:01.
 

The Following User Says Thank You to Raimu For This Useful Post:
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#205
Originally Posted by stlpaul View Post
After using 64mb zram swap for a week, my general impression is that my N900 is more laggy with it than it was without it. Clicking on any alerts or opening any program has a extra delay that didn't previously exist.

Using more than 64mb made things worse, and introduced minutes-long UI freezes.

I use zram on a server which also only has 256MB of RAM, and it performs great, it feels like it doesn't swap at all. Of course, the server has much faster CPU than the N900. I think the real trick is to keep total swap usage below the size of the zram swap device. On my server, swap usage is around 50MB at most. I think once it starts hitting real swap, zram is not as useful. My N900 usually has swap usage that exceeds the total RAM amount, much less the zram size, so I'm not sure it's the ideal environment.

But I'm extremely grateful to have the option to use it and I'm sure that someone here will find the right combination of size and sysctl tweaks to make it really fly.
After changing to kp50 I tried ramzswap in combination with (prioritized) swap on eMMC and / or SD. And had same experiences.
Used swappolube proposed settings, swappiness (30 and 100)
ideal profile with VDD1 and 2 enabled
and with or without freemangordon settings
Code:
#echo 0 > /proc/sys/vm/page-cluster
#echo 30 > /proc/sys/vm/swappiness

echo 512 > /sys/block/mmcblk0/queue/nr_requests
echo 512 > /sys/block/mmcblk1/queue/nr_requests
echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 0 > /sys/block/mmcblk1/queue/iosched/slice_idle
echo 32 > /sys/block/mmcblk0/queue/iosched/quantum
echo 32 > /sys/block/mmcblk1/queue/iosched/quantum
echo 80 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync
echo 80 > /sys/block/mmcblk1/queue/iosched/fifo_expire_sync
echo 180 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async
echo 180 > /sys/block/mmcblk1/queue/iosched/fifo_expire_async
After all, My expereinces lead me to disabling ramzswap.
It is true, that using it up to its swap limit may be useful. But after boot up my swap level exceeds ramzswaps size and it lags heavily.

Anybody out there having tested other settings with more success?

Or does freemangordon have an idea how to optimize this?
Thanks anyway for creating this unbelievable sytem update/upgrade possibilities.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#206
I'm using KP50 and downloaded already compiled "ramzswap.ko" file and placed it in "/lib/modules/2.6.28.10-power50".

as soon as i run this command - the device crashes:

insmod /lib/modules/current/ramzswap.ko disksize_kb=120512

i also tried with different size and still it crashes:

insmod /lib/modules/current/ramzswap.ko disksize_kb=98304

i am using swap on mmc only (internal memory swap is disabled).

Am i missing something? i tried to walk through the first post but compiling the sources is very complicated for me and i assume someone already have this working with KP50.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#207
WTH
You have kp50 installed which ships ramzswap module, and you download the module once more?
But thats not the problem. You have to use 65536kb.
And maybe your memory situation does not allow ramzswap to fetch memory. And thereby crashes (same happened to me, but only after fresh reboot, lot of mem occupied).
Let it settle, and try above value.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#208
You need to specify the disksize as a multiple of 2. For example, for 32MB use:

Code:
insmod /lib/modules/current/ramzswap.ko disksize_kb=32768
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 3 Users Say Thank You to vi_ For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#209
Now here is a VERY interesting paper that advocates the disabling of pre-fetching for massive improvements in VM on flash.
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 6 Users Say Thank You to vi_ For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#210
Originally Posted by peterleinchen View Post
WTH
You have kp50 installed which ships ramzswap module, and you download the module once more?
But thats not the problem. You have to use 65536kb.
And maybe your memory situation does not allow ramzswap to fetch memory. And thereby crashes (same happened to me, but only after fresh reboot, lot of mem occupied).
Let it settle, and try above value.
I just now realized that this module is already included in kp50 - and restored the original file.

however:
insmod /lib/modules/current/ramzswap.ko disksize_kb=65536

still causes the crash with the original module.
 
Reply

Thread Tools

 
Forum Jump


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