We have moved to a new Sailfish OS Forum. Please start new discussions there.
57

Set up zram to help Uitukka/Vaarainjarvi memory pressures [released]

asked 2014-10-29 07:30:55 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2015-01-19 11:02:42 +0300

pata gravatar image

Update 9 Uitukka seems to bring along memory pressures for ~tiny~ 1 GB RAM available. Tiny in that sense that Jolla has dual systems in place, modern Android devices have 2..3 GB of memory just for Android, but Jolla try to support both Android and Sailfish by only 1 GB.

New QT framework version 5.2 plus another more modern components of system SW like browser engine updated to Gecko 31 seems to give Jolla's RAM memory hard times. Sometimes (after update9) with many apps open Jolla feels little bit laggy like N900 which is notorious with constant swapping no matter what you try to do putting phone to lagging.

That might help partly if Jolla enables zram (linux kernel module offering compressed RAM cache) to make part of system memory compressed. By utilizing zram, device can hold more active content on RAM before swapping pages out to slow internal flash.

At least recent Android versions use zram as basic feature, so it should be well behaving linux kernel component to help Jolla out of OOM (pun intented).

EDIT1. There are zram module available in Openrepos (thanks @g7), it is unfortunately not compactible with Uitukka (see comments below).

EDIT2: I just noticed that this thread is actually at least half duplicate of zram swappiness tweaks..., but still I think that this is relevant to bring up in context of Uitukka issues with OOM.

EDIT3: I get hit by classic browser bug (clicks get registered in wrong place) making this thread unintentionally wiki ... There are no function for user to convert this back to question, I suppose.

EDIT4. So, I got what I deserved in this case - Now, as Wiki entry I add reference to another suggestion to improve and balance memory managenent to do whatever it can to keep Jolla sailing smoothly. This thread vm.swappiness discuss deeply of pros and cons of the set up swap management parameters.

EDIT5. Now, we have got in our hands update 10, which, indeed, has enabled zram as a base system feartue. What I have missed so far is the information if zram is enabled automatically for those that has not set it up already before upd10. I upgraded name of this thread accordingly.

EDIT. Yes, zram is active for all u10 users. Here are information how to change the zram size from default 13%: https://together.jolla.com/question/77183/how-to-change-zram-size/

I still wonder what is the best size for zram to prevent too aggressive low memory killer to kick in and start killiing (randomly, not so, but it still feels like it) of tasks?

I really do not like to loose my tasks regulary, I have even started to envy iOS approarch at least save the state of task before killing it to be able to restore it at least seemingly same state...

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by r0kk3rz
close date 2014-12-23 14:50:20.269086

Comments

There were some people that were testing it at some point and there is a package on openrepos. No idea how well it works.

ApB ( 2014-10-29 08:25:02 +0300 )edit
1

I have that Openrepos zram module activated before update to Uitukka. Openrepos zram work just fine, I have zero problems with that.

The kernel version of Uitukka is newer than Tahkalampi, so I removed zram before applying the update. I think that developer (eugenio) need to compile zram module again against Uitukka kernel to get that work.

I have not dared to install zram back to system updated to Uitukka before dev announces that openrepo version is compactible with Update9.

Of course, this is so deep integrated system feature that it really should come directly from Jolla so they can tune zram and hole system memory policy etc. parameters to fit together.

pata ( 2014-10-29 08:34:28 +0300 )edit
9

(I'm the zram maintainer on openrepos)

I'm waiting for the Uitukka kernel sources to be available so that I can recompile the module against the new kernel.

Stskeeps said that the module may ship by default in one of the upcoming updates, though it's not guaranteed it will be enabled by default. That would as well ease things for me because I only need to keep around the configuration package (zramcfg).

Unfortunately the "ancient" kernel version of the Jolla makes enabling zram not a trivial task. There are a few patches that need to be applied because the zram module in 3.4 does not support ARM by default. More patches means more testing that needs to be done.

g7 ( 2014-10-29 09:51:30 +0300 )edit
2

Like @pata I have the zram module activated on 1.08, as well as the gpu idle state module. Without them I find Sailfish pretty laggy and unsuitable for having multiple apps or tabs in browsers open. with, it's usable, though still not ideal. since 1.1 and the new Qt framework seem to be a lot more resource hungry, I think I'll be waiting until both are updated in Warehouse. Thanks @g7 for your work ... has made Sailfish much less frustrating to use for me.

midnightoil ( 2014-10-29 09:56:20 +0300 )edit

I think it's a complete duplicate and it would be better to have 60 votes on the original one than 30 votes on each. (Destiny has chosen to make your question a Wiki so you would not earn karma with a duplicate :P)

Sthocs ( 2014-10-30 23:46:51 +0300 )edit

2 Answers

Sort by » oldest newest most voted
7

answered 2014-11-19 19:35:44 +0300

g7 gravatar image

For those interested, I have finally uploaded an updated zram module for SailfishOS 1.1.0 Uitukka.

https://openrepos.net/content/eugenio/zramcfg-configure-zram

Eugenio

edit flag offensive delete publish link more

Comments

1

Thanks. Works. :)

Manatus ( 2014-11-19 20:04:08 +0300 )edit
1

Nice, thanks! :)

MartinK ( 2014-11-19 20:31:59 +0300 )edit
1

Thanks a lot! Seems to work like a charm!

olpe ( 2014-11-20 10:58:07 +0300 )edit
1

Just a note - I had to first uninstall the kernel module package (which also removed the configuration package) and then install the configuration package (which also pulled in the kernel module). Just updating was not enough for me.

BTW, to check if zram is being used, run this as root (devel-su) from the terminal:

swapon -s

If you see 3 swap devices, your zram is working fine. If you see only one, zram is not enabled. :)

MartinK ( 2014-11-20 14:27:14 +0300 )edit

Yup, updating the "zramcfg" package is not enough, the real thing is in the kernel-module-zram-jolla. I may add a versioned dependency on the former, but then it will rule out Tahkalampi users.

g7 ( 2014-11-20 16:29:53 +0300 )edit
4

answered 2014-11-15 00:09:23 +0300

r0kk3rz gravatar image

updated 2014-11-15 00:12:16 +0300

Jolla has stated that for Update 10 that zram would be enabled. and that they are working on the memory problems of uitukka

source: https://lists.sailfishos.org/pipermail/devel/2014-November/005168.html

edit flag offensive delete publish link more

Question tools

Follow
9 followers

Stats

Asked: 2014-10-29 07:30:55 +0300

Seen: 2,610 times

Last updated: Jan 19 '15