![]() |
[ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
3 Attachment(s)
Since version 49 compcache (ramzswap) is a part of kernel-power, the instructions bellow are not needed and shall be used just as a reference
Here is how to make compcache working on n900. You will need scratchbox or madde environment ready for kernel compilation 1. download latest (48) kernel power source in directory of your choice apt-get source kernel-power 2. unzip and copy attached patches (update_mmu_cache_arm.zip and patch_swap_notify_core_support_2_2.6.28.zip) into kernel-power-2.6.28\debian\patches 3.add update_mmu_cache_arm.diff at the end of series file cd kernel-power-2.6.28/debian/patches/ echo update_mmu_cache_arm.diff >> series 4.add patch_swap_notify_core_support_2_2.6.28.diff at the end of series file cd kernel-power-2.6.28/debian/patches/ echo patch_swap_notify_core_support_2_2.6.28.diff >> series 4. goto kernel source directory and build kernel package dpkg-buildpackage -rfakeroot -b 5. unzip compcache source(compcache-0.6.2.zip) into the same directory you've downloaded kernel sources 6. cd into compcache-0.6.2 and make it at that point you should have patched kernel .debs and ramzswap.ko for that kernel. Install kernel on the device and copy ramzswap.ko in /lib/modules/2.6.28.10-power48 reboot and use instructions here in short it is something like insmod /lib/modules/current/ramzswap.ko disksize_kb=65536 swapon /dev/ramzswap0 swapoff /dev/mmcblk0p3; swapon /dev/mmcblk0p3 Notifications are working, but seems there are paths in the kernel swap subsystem allowing direct write over a page without first marking it free. Seems like memory consumption should not be affected by that. I've disabled nokia swap page remapping (for performance reasons), will enable it again if swap fragmentation develops over time to see if it could help. EDIT: changed recommended disksize_kb to 120512 |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Is there any other way for people who can not compile for any other reason? Any precompiled debs, tars or anything?
Thank you, really. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
ok... i'm kinda idiot for this things, but i googled a little bit, so i saw what compcashe is... but, for what is benefit for us? and is it necessary for me to have it?
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
This way, when you are out of memory, instead of using a swap on disk, you use a swap on memory, that is faster. Even with having to sacrify ram for swap, and even compress the swap, you still gain speed by not having to access to disk. And I hope this is what it will happen with this patch. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Pre-compiled binaries in first post
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Omaigaaaaad, nobody comments on this?? The forum and my n900 is about to implosion, finally compcache!!
Haha, joking, I am waiting for some experiences comments, I can not test it myself until middle on next month :/, I really hope this may bring significative improvement. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
thanks for answers!
so to use it, we must install debs from the first post... right??? or it will be compiled maybe in the next kernel version, so to wait for update??? what do you recommend? thx for advise ;) |
Re: [ANNOUNCE] COMPCACHE on kernel-power
freemangordon what will this do to our N900 ?
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
First expression is very positive :)
After short usage, I would say that device is a bit more responsive (my subjective judgement) under heavy load (multiple application running simultaneously). Thanks for bringing this option to Maemo! EDIT: After some usage I see problems, device start to lag and eventually does not respond at all, need a reboot. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
So far I am not seeing much difference to be honest..although it hasn't been long. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
what is compcache do ?
it's useful to install ? |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
Ramzswap0 was filled first after reboot, so that looks okay. Curious to see how it's going to behave in terms of cpu/battery costs and performance wise after a period of time... Code:
cat /proc/swaps |
Re: [ANNOUNCE] COMPCACHE on kernel-power
I am installing right now..
should we be more careful with compcache enabled about swappiness value? a value of 100 would make the cpu compressing data all the time? edit: installed with priorities correct!. testing begins.. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
so once ive installed the .debs and added the .ko , what exactly do i do next ? and how do i do it? sorry for sounding somewhat uninformed :)
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
disable and enable again "regular" swap - as one turned on later, it will have lesser priority.
Another approach is to get swqapon from - for example - debian - it have setting priority ( - p ) working, unlike vanilla maemo swapon. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
cat /proc/swaps , i cant find the ramswap drive
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
what is compcache do ?
it's useful to install ? |
Re: [ANNOUNCE] COMPCACHE on kernel-power
After a reboot, the ramzswap0 gone...
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
i have been using it for about an hour
personally haven't noticed an improvement with the performance but the negative side i have noticed is after using metasploit3 N900 starts to lag so deadly with out using ramzswap0 it runs normal after using metasploit3 will do more tests anyway |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
Just crete a script, to load it after every boot + manipulate swaps as needed, then place it in event.d folder. There are *many* threads about it + article(s) in wiki. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
so far with heavy usage it behaves very nicely. looks like a winner to me. edit: after some time it did become unresponsive. I had to close two microb windows and to wait for a whole minute to respond and close them. all the time I could not even check with terminal or any other way what was using the cpu. when it woke up, i did not reboot and everything was ok again. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
TBH negative feedbacks are somehow expected, as without notifications enabled memory consumption is suboptimal, I will do my best to make them run, but I realy need some help from the guy who has made notifications patch (some guy from BFS kernel developers)
EDIT: btw I would not expect miracles as we are adding only about 60 MB for 128MB swap |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
ok now this is my final feedback
my first one was negative reason: lags after metasploit3 how to fix: set up more space for ramzswap0 increasing the internal swap to 1.5gb #not sure if it is important setting a event.d script to use ramzswap0 directly after the boot and set up a script using dbus to refresh the ramzswap0 when the device is inactive ------ and after all that i kindda felt a bit faster performance maybe others will feel more performance (cause i use speedpatch) which might makes me feel a bit of increased performance anyway thanks for your effort freemangordon (btw i love half-life *) //EDIT even whith the above when after a period of time Well N900 gets laggy to death cat /proc/swap i can see that the ramzswap0 almost finished hmm how much is the max disksize for ramzswap can N900 take? i tried 200mb ended with an instant reboot |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
even if i used 100mb
N900 gets laggy (very much) when the ramzswap is nearly full i see 20mb does no problems but not sure if any better performance |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Strange, i don't have such problems, seems that not using optimisation scripts with unknown effect is preferable option.
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
after esting i had the same problem as karam
when the ramzswap0 gets near to full n900 starts to lag untill reboot |
Re: [ANNOUNCE] COMPCACHE on kernel-power
second test, same results, after a couple of hours, application web closed. and then everything was stuck.
third test, I reduced ramzsawp to half size and so far so good edit: insmod /lib/modules/current/ramzswap.ko disksize_kb=131072 wait a minute. does the n900 have 131mb free even after boot? and then we momentarily swapoff the default partition,so 131mb have to be real ram. very risky operations. Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Performance is not quite up to par without ramzswap. It seems that swap notifications are a must!
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
I understand that specifying disksize_kb value as upper limit on uncompressed data size seems bit counter-intuitive but this is how it is... We need to present a "fixed-size" disk to kernel." (from the author of compcache). |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
Maemo 5 is looking really good. And it's looking better now that we will soon not need to swap on the slow flash ever again. |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Swapping on flash won't go away never, but it can improve, I hope.
|
Re: [ANNOUNCE] COMPCACHE on kernel-power
what is compcache do ?
it's useful to install ? |
Re: [ANNOUNCE] COMPCACHE on kernel-power
Quote:
|
All times are GMT. The time now is 21:43. |
vBulletin® Version 3.8.8