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)

mr_jrt 2011-12-06 22:37

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

Originally Posted by Alfred (Post 1133116)
So, in order to get swapset to work, i just need an sdcard, swapset installed and rebooted n900 after it's installation, right?

...the SD card will need to be partitioned to have a Linux swap partition, but other than that, yes.

stlpaul 2011-12-07 17:18

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

Raimu 2011-12-07 17:52

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.

This would be my compcache experience on the n900.

mr_jrt 2011-12-07 22:36

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

Originally Posted by Raimu (Post 1134613)
This would be my compcache experience on the n900.

...and mine too, sadly.

stlpaul 2011-12-08 00:30

Re: [ANNOUNCE] COMPCACHE on kernel-power (now with notifications)
 
I am wondering about the possibility of using dm-cache along with a zram device. Use the zram device as the cache layer for the flash-based swap partition. Then you swapon the dm device. My thinking is that this way zram gets used as a high-speed I/O cache for the swap device. My hope is that by doing that, zram gets the freshest activity, but old stuff gets flushed to flash swap when it's not needed.

Raimu 2011-12-08 00:55

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

Originally Posted by stlpaul (Post 1134805)
I am wondering about the possibility of using dm-cache along with a zram device. Use the zram device as the cache layer for the flash-based swap partition. Then you swapon the dm device. My thinking is that this way zram gets used as a high-speed I/O cache for the swap device. My hope is that by doing that, zram gets the freshest activity, but old stuff gets flushed to flash swap when it's not needed.

So... using RAM to cache the swap? This sounds like a vicious circle. :)

lma 2011-12-08 01:03

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.

Is that with the Nokia-default swappiness set all the way up to 100?

mr_jrt 2011-12-08 14:14

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

Originally Posted by lma (Post 1134821)
Is that with the Nokia-default swappiness set all the way up to 100?

Mine's currently set to 30.

According to swappolube:
30, swappiness
95, dirty ratio
60, dirty bgd ratio
0, dirty expire centisecs
0, dirty writeback centisecs
0, page-cluster
100, vfs cache pressure
1, laptop mode
128, mmc0 requests
128, mmc1 requests
2039, min. free kbytes

stlpaul 2011-12-08 18:46

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

Originally Posted by Raimu (Post 1134817)
So... using RAM to cache the swap? This sounds like a vicious circle. :)

Well, think in an ordinary circumstance you would use dm-cache to use an SSD to cache a HDD. This is like a home-made version of hybrid hard disks such as Seagate Momentus XT or OCZ RevoDrive Hybrid. This way the "hot" data is on the fast media and the "cold" data gets pushed back to the slower media. In our case, zram is the fast media and eMMC/µSD is the slow media.

Presently, zram swap device is highest priority, but as soon as it's full, the secondary swap partitions/files will get used instead. There's no high priority data, only high priority destination for whatever data is being swapped out. By using dm-cache, I hope it would allow us to prioritize data within the swap, hopefully to keep often-used data in the faster zram while pushing the useless unused swapped data into the flash.

Whether we're using zram as a swap device or as a cache device, that RAM is already used up either way, so I'm just speculating about if there's a more effective way to utilize the tools that we have, that's all. :)

stlpaul 2011-12-08 18:49

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

Originally Posted by lma (Post 1134821)
Is that with the Nokia-default swappiness set all the way up to 100?

I tried both default and other values but there wasn't a noticeable difference as far as I could tell.


All times are GMT. The time now is 20:52.

vBulletin® Version 3.8.8