maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   ZRAM: size considerations? (https://talk.maemo.org/showthread.php?t=96733)

MikeHG 2016-05-10 19:18

ZRAM: size considerations?
 
I've recently been hit by the OOM thing on my Jolla phone (never really found it much of a problem before), with things like Firefox and Chrome frequently being killed rendering a single tab with no other 'foreground' programs open. Not sure what's changed (I have installed a few other things, including daemons), but it is what it is...

I adjusted the ZRAM ratio to 40%, and that seems to have fixed it [1]. I'm sure there is an upper limit beyond which you lose performance, but it's not noticeable at all at 40%. Which leaves me wondering: why is the default (13%) so conservative? And what ratio have others found optimal?

Thanks.

[1] https://together.jolla.com/question/...re-swap-space/

MikeHG 2016-05-13 20:10

Re: ZRAM: size considerations?
 
Further use has led me to think 40% risks getting a process called 'system_server' stuck at using ~100% of a core. I'm not sure if it recovers eventually, but if it does it seems to take a long time to do so. On the plus side, you have to be running a fair few things to get it there.

Guess I'll try 30%... :)

[edit - although note that system_server seems to be part of Alien Dalvik, so if you don't use that, *maybe* 40% will work)

peterleinchen 2016-05-14 21:53

Re: ZRAM: size considerations?
 
The tablet comes preconfigured with 20%, so that is what I am gonna try on the phone too.

btw: how do you know it is system_server utilising the second core?
On my phone htop tells me second core almost always at 100% but system_server does not eat that cpu.
But what makes me curious is: 'ps aux|grep system_server' gives me always a different PID!?

MikeHG 2016-05-15 09:38

Re: ZRAM: size considerations?
 
I just used 'top'... Its owner is 'system'. Not sure about the PID - from memory it was always the same when it went 'haywire' (might even have been '61...' something, but I could be making that up), but now it's showing up as 1704 in 'ps' so I doubt that tells us anything helpful.

TMavica 2016-05-15 15:37

Re: ZRAM: size considerations?
 
Size=$(( $memory_in_kbytes * 1024 * 13 / 100 / num_zram_dev )) ?

MikeHG 2016-05-15 15:57

Re: ZRAM: size considerations?
 
Yep, I adjusted the '13 ' and it works, as evidenced by 'swapon' (as root) and obvious differences in behaviour [edit - you should reboot afterwards - maybe there's some daemon you can restart / file you can 'source' instead, but screw it, you're not running any £multimillion websites on your phone, are you ;) ]

I confess I didn't go down the rabbit hole of working out what it's actually scaling against, but it seems ballpark right if you account for RAM reserved for the kernel / GPU etc. etc. ...


All times are GMT. The time now is 02:33.

vBulletin® Version 3.8.8