maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Compcache on N810 (https://talk.maemo.org/showthread.php?t=28034)

locusf 2009-04-01 19:22

Compcache on N810
 
1 Attachment(s)
Hi,

Just wanted to report on some results regarding compcache on N810 diablo. I compiled the modules required and I have given it a small test on my own N810. See the link below for information.

http://code.google.com/p/compcache/

See the attached zip:

EDIT: now its called ramzswap
Attachment 3304


By far I have tested it with the biggest RAM hog that I know, the browser.

Some proof attached:

root@Nokia-N810-23-14:~ #_cat /proc/swaps
Filename Type Size Used Priority
/dev/ramzswap0 partition 31692 2008 -2

EDIT:

After posting my tablet rebooted, *sigh*

locusf 2009-07-21 14:15

Re: Compcache on N810
 
1 Attachment(s)
Quote:

Originally Posted by locusf (Post 276606)
Hi,

Just wanted to report on some results regarding compcache on N810 diablo. I compiled the modules required and I have given it a small test on my own N810. See the link below for information.

http://code.google.com/p/compcache/

See the attached zip:

EDIT: now its called ramzswap
Attachment 3304


By far I have tested it with the biggest RAM hog that I know, the browser.

Some proof attached:

root@Nokia-N810-23-14:~ #_cat /proc/swaps
Filename Type Size Used Priority
/dev/ramzswap0 partition 31692 2008 -2

EDIT:

After posting my tablet rebooted, *sigh*

Ok, I got the fix for N810 and all ARM based products that were having issues with compcache. So here Attachment 3740 it is.

Stskeeps 2009-07-21 14:26

Re: Compcache on N810
 
Quote:

Originally Posted by locusf (Post 305758)
Ok, I got the fix for N810 and all ARM based products that were having issues with compcache. So here Attachment 3740 it is.

Could you release the source you used in order to build it, as well? Then we can include in Mer kernels, for instance. Or is it just the release from the code.google site?

spock 2009-07-21 14:46

Re: Compcache on N810
 
I'm interested in some more information about it as well. It sounds like a great idea but how do I properly use the .ko files? Can we make it into a package that can be installed through apt-get? What kind of performance are you seeing?

Thanks!

locusf 2009-07-21 15:16

Re: Compcache on N810
 
Quote:

Originally Posted by Stskeeps (Post 305759)
Could you release the source you used in order to build it, as well? Then we can include in Mer kernels, for instance. Or is it just the release from the code.google site?

Yeah its just the release from code.google.com site.

Quote:

I'm interested in some more information about it as well. It sounds like a great idea but how do I properly use the .ko files? Can we make it into a package that can be installed through apt-get? What kind of performance are you seeing?

Thanks!
I'm seeing lots of improvements in the browser and evince, to name but a few. It used to take ten seconds when flash swap was used, to browse from page to page in evince. Now its a like 2 seconds or so. Also the browser sluggishness is gone.

You gotta ask the admins to include this to Mer repository, I can of course make a package for this if needed. But without the package, extract the zip and run from the same directory as you extracted the zip:

Code:

insmod xvmalloc.ko
insmod ramzswap.ko

You can specify the size of the swap as well in the insmod as a parameter:

Code:

insmod ramzswap.ko disksize_kb=10240

debernardis 2009-07-22 04:27

Re: Compcache on N810
 
Maybe I can't use them on Chinook? Is it version specific.
I insmodded both modules without error messages - but when I ask cat /proc/swaps only the flash swap on mmc2 is shown.


EDIT Aha! needs
Code:

swapoff /media/mmc2/.swap
swapon /dev/ramzswap0 /media/mmc2/.swap

Plays nice with easy debian. Ooo seems faster - I'll do some timings later :cool:
Also, ooo allocates all the default 31700 megabytes of the ramzswap device, and runs over the .swap file on flash which has lower priority. Maybe a bigger ramzswap space could be better - tweak and experiment.

@locusf: also, I bet you have ported the 0.5 version, because it does not accept the parameters of the newest version, i.e. 0.6. Would you mind trying that one? Thanks :)

javispedro 2009-07-22 22:21

Re: Compcache on N810
 
This is a very nice idea indeed but I see two missing critical features:

a) When the "virtual swap" is full, it sends _uncompressed_ pages to the backing swap device. It would be nice to compress them before, may help with swap-on-sd performance.

b) The Diablo kernel version (2.6.21) does not support bio_discard (AFAIK) and as such it does not free memory when you close apps -- it will reuse it as soon as you need to swap out again, but it won't reuse the memory for file cache or something else.

After playing with it for a while:
Code:

BackingSwap:        /dev/mmcblk1p3
DiskSize:          265072 kB
MemLimit:          19016 kB
NumReads:          46543
NumWrites:          55683
FailedReads:              0
FailedWrites:              0
InvalidIO:              0
PagesDiscard:              0
ZeroPages:            5774
GoodCompress:            100 %
NoCompress:              0 %
PagesStored:          22095
PagesUsed:            4838
OrigDataSize:          88380 kB
ComprDataSize:          19012 kB
MemUsedTotal:          19352 kB
BDevNumReads:          21727
BDevNumWrites:          16769

Performance feels indeed better but as soon as you hit the MemLimit it slows down to a crawl again, and that's why I am suggesting a).

BTW, I could open nxagent, oowriter, oocalc, abiword, cacaovm running swt-example, the sun embedded jvm, xfce, Thunar, plus the whole of hildon at the same time before it started being unusable =).

Agent 770 2009-07-24 09:46

Re: Compcache on N810
 
Any hope to get this working in OS2007HE?
770 users desperately need those kind of improvements.

debernardis 2009-08-14 07:11

Re: Compcache on N810
 
I've been daily issuing this:
Code:

swapoff /dev/ramzswap0 /media/mmc2/.swap
swapon /dev/ramzswap0 /media/mmc2/.swap

when all application are closed.
This wipes the flash-based swap and re-enables it after.

I'm convinced (maybe it's an illusion) that it keeps my tablet quicker by refreshing all swap needed to the ram-based compressed ramzswap0 device.

javispedro 2009-08-14 10:43

Re: Compcache on N810
 
Quote:

Originally Posted by debernardis (Post 311663)
I've been daily issuing this: [CODE]
swapon /dev/ramzswap0 /media/mmc2/.swap[/CODE

By doing that ramzswap will not be using /media/mmc2/.swap as backing swap, but Linux will. The former is theoretically better. Is there any reason you're doing it this way? (even though maybe there's no performance benefit either way).


All times are GMT. The time now is 23:57.

vBulletin® Version 3.8.8