maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   idea for kp: partially compressed RAMdisk as swap? (https://talk.maemo.org/showthread.php?t=83731)

sulu 2012-04-18 14:20

idea for kp: partially compressed RAMdisk as swap?
 
Hi,

I just stumbled upon this site [1] where right at the beginning a method called ramzswap is mentioned. Investigating further I found this [2] and finally ended up here [3].

Essentially it's trading off CPU power in favour of RAM (hopefully at a very favourable exchange rate). For the Efika MX [4] this seems to improve performance and since the HW of the N900 isn't that different I guess this might apply here too. But then again I'm concerned about the watchdog if big amounts of ramzswap contents are read or written.

Any thoughts on this (especially from kp developers)?

[1] http://wiki.debian.org/EfikaMXOptimizingPerformance
[2] http://forum.linode.com/viewtopic.php?p=35935
[3] http://code.google.com/p/compcache/
[4] http://wiki.debian.org/EfikaMX

freemangordon 2012-04-18 14:25

Re: idea for kp: partially compressed RAMdisk as swap?
 
"modprobe ramzswap" does not work for you? As it is a part of kp since v48 IIRC.

EDIT:
here is the dedicated thread.

sulu 2012-04-18 14:43

Re: idea for kp: partially compressed RAMdisk as swap?
 
Quote:

Originally Posted by freemangordon (Post 1193855)
"modprobe ramzswap" does not work for you? As it is a part of kp since v48 IIRC.

Actually it was v49 [1]. I promise to read changelogs in the future! :o

[1] http://talk.maemo.org/showthread.php...light=ramzswap

Raimu 2012-04-18 16:38

Re: idea for kp: partially compressed RAMdisk as swap?
 
The interesting thing we pretty much realized is that swapping into RAM essentially makes a n900 perform worse, not better.

freemangordon 2012-04-19 06:39

Re: idea for kp: partially compressed RAMdisk as swap?
 
Quote:

Originally Posted by Raimu (Post 1193912)
The interesting thing we pretty much realized is that swapping into RAM essentially makes a n900 perform worse, not better.

Hmm, I am using 64MB of compressed swap for the last several months and that, combined with second swap on microsd (and 805 MHz OC) makes my n900 responsive and fast for normal usage - the only times I see lag and stutter is when the device reconnects from GPRS to WIFI and back, but I assume that normal, after all I have 4 IM + 3 email accounts and everyone fights for CPU/IO bandwidth on such reconnect.

fw190 2012-04-19 11:44

Re: idea for kp: partially compressed RAMdisk as swap?
 
Is there any step by step instruction how to have such a smooth N900 as yours for people without proper know-how in linux?

Raimu 2012-04-19 14:49

Re: idea for kp: partially compressed RAMdisk as swap?
 
Quote:

Originally Posted by freemangordon (Post 1194200)
Hmm, I am using 64MB of compressed swap for the last several months and that, combined with second swap on microsd (and 805 MHz OC) makes my n900 responsive and fast for normal usage - the only times I see lag and stutter is when the device reconnects from GPRS to WIFI and back, but I assume that normal, after all I have 4 IM + 3 email accounts and everyone fights for CPU/IO bandwidth on such reconnect.

Humm. Then I've no idea why mine doesn't respond as well. The user behind the swapset scripts reported similar added lags and people stopped talking on the compcache thread some two days after.

sulu 2012-04-19 15:18

Re: idea for kp: partially compressed RAMdisk as swap?
 
(de)compressing data in ramzswap will need CPU power which in case of our Cortex A8 may easily put the CPU to full load.
So the performance impact of using ramzswap is highly task-dependent. If you do nothing else but RAM I/O you'll notice a gain compared to real swap I/O. But if you have a high CPU load anyway due to the task you're running it's likely that the additional load caused by the (de)compression will even slow down your task compared to reading/writing data from/to swap but without a compression algorithm involved.

bottom line:
Comparing ramzswap performance results makes no sense without saying which task was benchmarked.

Hurrian 2012-04-19 15:33

Re: idea for kp: partially compressed RAMdisk as swap?
 
Quote:

Originally Posted by freemangordon (Post 1194200)
Hmm, I am using 64MB of compressed swap for the last several months and that, combined with second swap on microsd (and 805 MHz OC) makes my n900 responsive and fast for normal usage - the only times I see lag and stutter is when the device reconnects from GPRS to WIFI and back, but I assume that normal, after all I have 4 IM + 3 email accounts and everyone fights for CPU/IO bandwidth on such reconnect.

I stopped using ramzswap on the N900 - even if I used the IO Improvement tweaks, once you fill up the swapspace, everything grinds to a halt.
It doesn't help that Maemo likes spiking CPU usage for no reason at all, especially when your CPU is hammered compressing/decompressing while swaps are thrashed for infinity.

_David_ 2013-03-29 13:57

Re: idea for kp: partially compressed RAMdisk as swap?
 
I'm getting the impression this is a great feature which needs some tweaking to make it work well.

Firstly, by sampling CPU usage, we could tell compcache to stop compressing when CPU usage is high.

Secondly, with some stats, we could profile which programs' data weren't worth compressing and exclude them.

Quote:

Originally Posted by Hurrian (Post 1194422)
I stopped using ramzswap on the N900 - even if I used the IO Improvement tweaks, once you fill up the swapspace, everything grinds to a halt.

Shouldn't the compressed ramdisk be paged out to flash swap (without decompressing) when it's full?

Quote:

It doesn't help that Maemo likes spiking CPU usage for no reason at all, especially when your CPU is hammered compressing/decompressing while swaps are thrashed for infinity.
Bug that can be fixed?


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

vBulletin® Version 3.8.8