Reply
Thread Tools
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#191
Originally Posted by Alfred View Post
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.
 

The Following User Says Thank You to mr_jrt For This Useful Post:
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#192
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.
 

The Following 3 Users Say Thank You to stlpaul For This Useful Post:
Raimu's Avatar
Posts: 139 | Thanked: 181 times | Joined on Nov 2011 @ Oulu, Finland
#193
Originally Posted by stlpaul View Post
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.
 
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#194
Originally Posted by Raimu View Post
This would be my compcache experience on the n900.
...and mine too, sadly.
 
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#195
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.
 

The Following User Says Thank You to stlpaul For This Useful Post:
Raimu's Avatar
Posts: 139 | Thanked: 181 times | Joined on Nov 2011 @ Oulu, Finland
#196
Originally Posted by stlpaul View Post
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.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#197
Originally Posted by stlpaul View Post
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?
 
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#198
Originally Posted by lma View Post
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
 
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#199
Originally Posted by Raimu View Post
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.
 

The Following User Says Thank You to stlpaul For This Useful Post:
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#200
Originally Posted by lma View Post
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.
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:06.