Reply
Thread Tools
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#111
Originally Posted by jenix View Post
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
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 

The Following 9 Users Say Thank You to TMavica For This Useful Post:
Posts: 176 | Thanked: 122 times | Joined on Apr 2010
#112
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
 

The Following 3 Users Say Thank You to magullo For This Useful Post:
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#113
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
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica

Last edited by TMavica; 2018-02-21 at 08:29.
 

The Following 5 Users Say Thank You to TMavica For This Useful Post:
Posts: 74 | Thanked: 355 times | Joined on Aug 2017
#114
Originally Posted by TMavica View Post
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.
 

The Following 6 Users Say Thank You to jenix For This Useful Post:
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#115
At least my phone can run many apps without OOM occured, and smoothly
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 

The Following 4 Users Say Thank You to TMavica For This Useful Post:
karlos devel's Avatar
Posts: 137 | Thanked: 392 times | Joined on Mar 2013 @ Guate
#116
Copy in Sailfish-browser not work on sailfish x , sailors to confirm this?
 

The Following 2 Users Say Thank You to karlos devel For This Useful Post:
Fellfrosch's Avatar
Posts: 1,092 | Thanked: 4,995 times | Joined on Dec 2009 @ beautiful cave
#117
works for me...
 

The Following 2 Users Say Thank You to Fellfrosch For This Useful Post:
karlos devel's Avatar
Posts: 137 | Thanked: 392 times | Joined on Mar 2013 @ Guate
#118
Originally Posted by Fellfrosch View Post
works for me...
Thanks , seems not reliable.
 

The Following 2 Users Say Thank You to karlos devel For This Useful Post:
Posts: 175 | Thanked: 201 times | Joined on Mar 2014 @ .LT
#119
Originally Posted by TMavica View Post
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?
 

The Following 2 Users Say Thank You to wrm For This Useful Post:
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#120
wifi tethering is still disabled?
__________________
BWizz - best N9 bookmark editing tool! Check it out ->BWizz for Harmattan

LINKer - transform your N9's home view in a Desktop, give it the freedom it deserves! -> LINKer for Harmattan

QuickBar - Can't find the app you used yesterday in your overcrowded Home Screen? Want access to the QuickLaunch bar even in the home screen? QuickBar for Harmattan

If you like our work, and would like to support via PayPal : users.giulietta@gmail.com
 

The Following 2 Users Say Thank You to tortoisedoc For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 14:05.