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

apps get killed / freezed too soon. [duplicate]

asked 2015-09-29 23:45:22 +0300

pawel gravatar image

updated 2015-11-03 20:25:28 +0300

r0kk3rz gravatar image

i do never run more then 5 to 6 apps in parallel, mostly only 3-4. however today i had open: sailorgramm, mail and browser. i did some browing: during this sailorgramm got killed. i noticed after five minutes, that when i clicked on sailorgramm the app was restarted. while sailorgramm is not running you will not receive notifications on new messages. this did happen. yesterday i was listening to music, while browsing music player did stop. this happened twice. i never have more then 2 tabs 'open', mostly only one.

i am not sure what the correct fix is: but a running player should not be freezed. and while running apps are required to receive notifications, messengers should not get freezed too.

duplicate of: https://together.jolla.com/question/108599/11928-alarming-oom-behavior-killing-apps/

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by pawel
close date 2015-09-30 12:44:50.705544

Comments

1

I'm sure you can find a duplicate: https://together.jolla.com/questions/scope:all/sort:activity-desc/page:1/query:oom/

Tanghus ( 2015-09-30 01:17:57 +0300 )edit

is this a normal behavior since the last update? I mean i see my opened apps as covers in the home screen but the seem to be frozen, blury and the quick action buttons are gone. when I tap on the cover, it restarts!?

Dragomir ( 2015-09-30 09:33:21 +0300 )edit
1

@Dragomir Yes, this is normal now. Apps not closed via swipe down or the home screen (but e.g. by the OOM Killer or because the app crashed) will leave a "ghost" cover. When touched, the app will be restarted.

t-lo ( 2015-09-30 09:42:48 +0300 )edit

@ Dragomir: yes that is the new normal. Auto-killed applications stay visible in frozen state and serve as quick launch icons rather than representing miniature screens of actually running programs.

Somebody mentioned before: WebOS tells the user: there are too many "cards" opened, please close some ... before opening new... This was a polite way to prevent pushing the system into swapping / slow down by opening more processes.

Sailfish' approach is very rude and brute force in comparison.

My impression is that there is some kind of preference installed on what to kill first: for example I found the Sailfish media player to be less easy killed than a 3rd party one like QuasarMX but still... it is very rough behavior.

Music streams or authenticated browser sessions should not be killed just like that.

Looks like heavy work in progress and I find the experience now worse than in early days.

Sure the UI interface is fast, but when it is time to get things done, I experience more hickups and killed programs than ever since early 2014. Anybody can agree with this?

vandersmash ( 2015-09-30 09:46:43 +0300 )edit
1

@Tanghus: yes if i knew i have to search for oom, i just now ooomph.

https://together.jolla.com/question/108599/11928-alarming-oom-behavior-killing-apps/

pawel ( 2015-09-30 12:44:08 +0300 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2015-09-30 10:51:48 +0300

t-lo gravatar image

@pawel I understand that this seemingly random behaviour can be annoying. Please do understand that the Jolla phone is very limited resource-wise, w/ its ~800 MBytes of RAM available to the runtime. Since Jolla does not implement its own memory handling but relies on default Linux (including the OOM Killer) we can use stock Linux tools to drill down on the problem. However, in order to get to the root cause, please provide more metrics.

To get you started, LWN has a nice introduction to the Linux OOM handler: https://lwn.net/Articles/317814/

Here are a few examples of what you can collect from the Terminal. Prerequisites: You have an SD card inserted and cd'ed to the directory where it's mounted (since we will produce quite some log data); usually /media/sdcard/<id>/. Also, this assumes you're root (e.g. by running devel-su).

  1. See what's really eating your memory, log mem usage to file every second:
    • run top | tee mem.log
    • sort by RES (resident stack size) usage: press (capital) O, then q, then return
  2. Log oom_adj and oom_score (both are explained in the LWN piece linked above) of the 50 highest scoring processes:

    while true; do for p in /proc/[0-9]*/; do
        printf '%3.3s %3.3s %40.40s' "$(cat $p/oom_adj)" \
                                     "$(cat $p/oom_score)" "$(cat $p/comm)";
        echo "$(cat $p/cmdline)"; 
        done | sort -n -k 2 | tail -n 50;
    done | tail oom.log
    

Be aware that this will put significant load on the device's battery, so better do this w/ a power cord attached. Please set up your device for active logging as described above, try to reproduce your out-of-memory situation, then check the logs generated.

edit flag offensive delete publish link more

Comments

the Jolla phone is very limited resource-wise, w/ its ~800 MBytes of RAM

Just like N9, and yet I don't remember a single OOM killing on Harmattan. Hell, even shitty Android on HTC Desire HD which had 768 Mb of RAM total could handle 50 (fifty) opened tabs in Firefox (I was surfing TVtropes). And don't even get me started on N95 that had 160 Mb of RAM and yet allowed pretty much the same as Jolla, sometimes even more.

ScumCoder ( 2015-09-30 11:05:19 +0300 )edit

This question is tagged "1.1.9.28" for a reason, also you can see from the above comments, that it is the "new normal". I am experiencing the same behavior since the update to "2.0". I had almost no problems with OOM in the previous release.

the_mgt ( 2015-09-30 11:12:56 +0300 )edit

@ScumCoder Apples and Oranges. None of your historic Nokia examples even come close to the stack that Jolla runs today, in terms of capabilities. I owned an N95, back in the day, and I don't remember e.g. multitasking at all. Or having a somewhat-HTML-conformant browser. Or... I understand there is a lot of nostalgia for the old Nokia products, however, none of those compares to SailfishOS. Also, you're comparing the productive output of a company with many a thousand employees with that of a start-up w/ a total of 120 people.

Thirdly, did you try and open 50+ tabs in Firefox (instead of the stock broser) )on Jolla? Dalvik VM memory handling is significally different from stock Linux, so we're comparing apples with oranges again.

Finally, It would be awesome if you could come up with some metrics that support your claims. If there's an application eating too much memory - could you please e.g. run a valgrind / Massif analysis to check what's amiss? If you're suspecting 2.0 to eat more memory than previous versions, could you please run the above scripts from my answer on both versions, right after boot, then do some work with your phone, so we can compare the actual footprints?

t-lo ( 2015-09-30 11:22:09 +0300 )edit

@the_mgt: Please run the commands / scripts lined out in my Answer on the previous and on this release, right after boot, the do some work on the phone. This way we'll narrow down on what was changed in SailfishOS 2.0 that is now eating away our memory.

t-lo ( 2015-09-30 11:24:24 +0300 )edit

@t-lo: thanks for the detailed information, but i am not using 10 apps in parallel. i used 3-5 max. this behaviour is new, came with 1.1.9.28. and last: who needs a scrollable home, when all 'tiles' are not live but dead ? (in microsoft speach;.))

i will do the measurement asap

pawel ( 2015-09-30 12:42:14 +0300 )edit

Question tools

Follow
2 followers

Stats

Asked: 2015-09-29 23:45:22 +0300

Seen: 346 times

Last updated: Sep 30 '15