maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   2.1.4 EA / Lapuanjoki (https://talk.maemo.org/showthread.php?t=100207)

TMavica 2018-02-20 18:49

Re: 2.1.4 EA / Lapuanjoki
 
Quote:

Originally Posted by jenix (Post 1541393)
No sure, if this is caused by the available RAM, as there are around 800 MB free on my device:
Code:

[root@Sailfish nemo]# free -m
            total      used      free    shared    buffers    cached
Mem:  2835      2059        776          0        52        682
-/+ buffers/cache:      1325      1510
Swap:            0          0          0

Nevertheless, adding swap is no big deal, and if it prevents unwanted closing of apps, let's do it. Below, I create a swapfile in /home which is the biggest partition available. Placing it directly in /home is somewhat unaesthetic, but we have to work with what's available. Putting it on the sdcard is a dumb idea because a) access speeds are way slower and b) it would wear the sdcard quite badly.

As always: DISCLAIMER: You're doing this on your own risk, I'm not responsible if something goes wrong. This reduces the available space for the user data by the amount of swap you are adding.

You can choose the size of the swap in the first comand (fallocate), either use M (for MB) or G (for GB). In my example, I create a 2 GB swap file.
Code:

# Create the swapfile
fallocate -l 2G /home/swapfile
# Set permissions
chmod 600 /home/swapfile
# Prepare file as swap
mkswap /home/swapfile
# Enable swap
swapon /home/swapfile

# Now, you can check that swap memory is available:
free -m

# Finally, add an entry to /etc/fstab so the swap gets enabled on boot
echo "/home/swapfile none swap defaults 0 0" >> /etc/fstab

If you want to remove the swap file any time (e.g. you need the space), delete the entry in /etc/fstab, disable it with
Code:

swapoff /home/swapfile
and delete the file.


Same for me. I'd suspect this is not a memory issue but maybe rather some incompatibility with the browser API!? It always crashes when you are in the middle of the loaded page (according to the scrollbar), so I'd suspect it tries to load more entries and fails.

I use that method

zramctl -s 1048576000 /dev/zram0
mkswap /dev/zram0
swapon /dev/zram0
swapon -s

magullo 2018-02-21 07:15

Re: 2.1.4 EA / Lapuanjoki
 
Upgrading both Jolla 1 and X. So far nothing to report, camera on X still seems not precise, front one doesn't auto focus.
Still prefer Jolla 1 for small things.

Sent from my SM-N950F using Tapatalk

TMavica 2018-02-21 07:57

Re: 2.1.4 EA / Lapuanjoki
 
tested with swap memory enabled, if i open many app include android app, no OOM happened, if I disabled it, OOM happened and phone is slowed down。 With swap memory enabled, when open many apps, the phone still very smooth

jenix 2018-02-21 08:57

Re: 2.1.4 EA / Lapuanjoki
 
Quote:

Originally Posted by TMavica (Post 1541434)
I use that method

zramctl -s 1048576000 /dev/zram0
mkswap /dev/zram0
swapon /dev/zram0
swapon -s

Thanks for pointing out another option. I never used zram before, the way I understand it is that it extends the available memory by compressing all tables in /dev/zram0 and storing them in the RAM itself. This clearly has the advantage that it does not require any actual disk space (thus leaving the already small user space untouched). Regarding the performance, I can't say which is better (reading/writing to the slower disk or doing compression in RAM).

However, I actually noticed that my swap is rarely used. I had to run a lot of apps for it to actually start running out of memory and using the swap file (and even then it only used like 1 MB from the swap). This probably has to do with the swapiness settings (vm.swappiness is set to 30). I'd mostly suspect that there is actually enough memory available on the XperiaX, but the memory management seems to be slightly off, causing the OOM handling (= killing of apps) to be executed rather fast. Extending the memory with swap of course fixes this (as there is enough free memory available), even though the swap is rarely used. If this is the case, using zram would be the better option since it's mostly about providing additional memory to prevent OOM, even though it is rarely used.

TMavica 2018-02-21 09:12

Re: 2.1.4 EA / Lapuanjoki
 
At least my phone can run many apps without OOM occured, and smoothly

karlos devel 2018-02-21 10:59

Re: 2.1.4 EA / Lapuanjoki
 
Copy in Sailfish-browser not work on sailfish x , sailors to confirm this?

Fellfrosch 2018-02-21 11:08

Re: 2.1.4 EA / Lapuanjoki
 
works for me...

karlos devel 2018-02-21 11:21

Re: 2.1.4 EA / Lapuanjoki
 
Quote:

Originally Posted by Fellfrosch (Post 1541454)
works for me...

Thanks , seems not reliable.

wrm 2018-02-21 13:50

Re: 2.1.4 EA / Lapuanjoki
 
Quote:

Originally Posted by TMavica (Post 1541448)
At least my phone can run many apps without OOM occured, and smoothly

On JP1 I used to set memory killer module at: adj 9999 and min free 1 (or vice versa), also wrote these values somewhere in init.rc, to save them in case of reboot. But now cant find these original values in init.rc file to modify them. Any ideas where they are hidden? Or gone?

tortoisedoc 2018-02-21 15:30

Re: 2.1.4 EA / Lapuanjoki
 
wifi tethering is still disabled?


All times are GMT. The time now is 09:31.

vBulletin® Version 3.8.8