maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [ANNOUNCE] COMPCACHE on kernel-power (now with notifications) (https://talk.maemo.org/showthread.php?t=76112)

Hurrian 2011-12-08 22:54

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
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.

Estel 2011-12-09 00:38

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
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

Hurrian 2011-12-09 03:04

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Quote:

Originally Posted by Estel (Post 1135265)
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.

Raimu 2012-04-19 14:51

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
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?

peterleinchen 2012-05-27 09:32

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Quote:

Originally Posted by stlpaul (Post 1134597)
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.

impeham 2012-05-27 09:41

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
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 2012-05-27 09:48

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
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.

vi_ 2012-05-27 09:49

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
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

vi_ 2012-05-27 10:04

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Now here is a VERY interesting paper that advocates the disabling of pre-fetching for massive improvements in VM on flash.

impeham 2012-05-27 10:17

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Quote:

Originally Posted by peterleinchen (Post 1213224)
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.


All times are GMT. The time now is 21:21.

vBulletin® Version 3.8.8