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)

Estel 2012-07-05 11:20

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Read first few posts/pages?

peterleinchen 2012-07-06 21:49

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

Originally Posted by jurop88 (Post 1232053)
For me, compcache works and I feel the speed/occasional lags tradeoff OK

Could be you are not having lots of background processes, daemons and so on running? I am always having > 200 MB swap in use. Maybe for a lesser amount compcache is working?


Quote:

Originally Posted by jurop88 (Post 1232053)
Currently I've swapset installed, so I think it sets swaps after start of Hildon-desktop

Then it is normal, that a few MBs are used within eMMC swap, as swapset enables compcache at a later time.
Could be done a bit earlier.



Quote:

Originally Posted by jurop88 (Post 1232053)
I mean:
If data used 'often' are swapped in compcache, we could try to swap out 'old' data from compcache to 'real' swap in order to keep most used data in ram. I did not found any mechanism like that - and at a second glance it looks like it won't make sense in a desktop system where we don't have so many constraints and compressed file systems. I am currently using two smaller eMMC swaps instead of a big one, and it feels more laggy but with shorter lags. It is really hard to tell if there are differences without a test suite and with so many use cases.

Now I understand.
No, as freemangordon stated in some earlier post. There is no control when/where/which swap is used, if compcache is enabled.

mr_jrt 2012-08-01 11:09

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Just wanted to chime in that I've finally gotten around to making swapset it's own thread.

KotCzarny 2016-12-11 13:17

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
quick instruction how to make it run on every boot:

new file: /etc/event.d/rc-local
Code:

start on MOUNTS_OK

console output
exec /etc/rc.local

new file: /etc/rc.local
Code:

#!/bin/sh

echo "[/etc/rc.local]"

/sbin/swapoff -a
/sbin/modprobe ramzswap num_devices=4 disksize_kb=32768
/sbin/mkswap /dev/ramzswap0
/sbin/swapon /dev/ramzswap0
/sbin/swapon -a

as a bonus you can put even more things to run in /etc/rc.local. cheers!

Xagoln 2017-01-02 00:48

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Do you think CompCache is giving any benefit on N900? I tried it in the past but found it would cause big problems when the ram swap was full.

KotCzarny 2017-01-02 07:01

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
make it small enough (16-32M imo) and it might be of some use, but nothing will help if you run too many apps/widgets at the same time.

mr_pingu 2017-08-10 08:50

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
Are people still using this?
Never bothered trying, does it really gain performance over just swap on SD?

Macros 2017-08-10 12:01

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
I would be quite sure it does.

Writing to the SD Card is quite slow,
slow enough that even the slow processor of the N900 should apply the simple compression at a much faster rate.

Also random seek times are by magnitudes better for ram.
Obviously this will give you far less additional memory than swap on a SD can.

(Maybe I will test it myself within the next week)

Oh no need! There is an extensive study by Nokia themselves!
https://www.tizen.org/sites/default/...he-meego_0.pdf
Man I miss the old Nokia :(
So it has huge benefits, even over Swap on the device eMMC, which is faster than a SD.

Xagoln 2017-09-09 06:18

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

Originally Posted by Macros (Post 1532395)
(Maybe I will test it myself within the next week)

So did you test it? In the past I found it didn't make much of a difference that I could detect but would cause the phone to freeze for long periods, similar to when a computer runs out of memory and starts 'thrashing'. Perhaps tweaking the configuration would have helped - this was 5 years or so ago.

pythoneye2 2017-09-09 11:39

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
If i remember correctly i measured it makes booting 15 seconds faster. Assuming you enable it early.

The problem is that for compression you want a small vm/page_cluster size like 4kb. (echo 0 > /proc/sys/vm/page-cluster)

But as fallback it hits emmc with 4kb read and writes, which may result in very poor swapping performance. (Im not even sure if you can change the 4kb swap fallback size by altering vm/page-cluster or it is hardcoded)


All times are GMT. The time now is 14:38.

vBulletin® Version 3.8.8