We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2017-11-14 16:15:24 +0200 |
On my Xperia X (SFOS 2.1.3.7) I noticed that there is no swap at all. I always thought that no swap at all was a bad idea in general, and now after using the phone for a few weeks I've experienced some cases where apps would be unexpectedly killed, usually just the browser but sometimes some android apps as well, when for example loading a heavy webpage. On JollaC this almost never happened to me, so it's strange that a device with more RAM has this problem.
For example (maybe an outdated/overkill example but proves the point) the Peacekeeper browser test (http://peacekeeper.futuremark.com/) always crashes at the fourth testing sequence.
To check if the lack of swap was really the culprit, I created a 1GB swap file in my home directory. After enabling the swap I ran the Peacekeeper test and this time it succeeded to finish the whole test. During the test around 450MB of swap was used. Another test with the swap disabled caused browser to be killed again, and once swap was enabled it went straight through, again. So my conclusion is that swap should be enabled for the Xperia X to ensure stability of the system/apps in heavy usage.
IIRC there isnt a swap-partition, the system-partition is too small for swap, and creating a new swap-partition is highly risky. But this can be solved by creating a swap-file in the home-partition which has the most space. 512MB or maybe even smaller (<400mb on JollaC) swap file is probably enough, so its not a huge sacrifice for the stability. Any thoughts?
2 | No.2 Revision |
On my Xperia X (SFOS 2.1.3.7) I noticed that there is no swap at all. I always thought that no swap at all was a bad idea in general, and now after using the phone for a few weeks I've experienced some cases where apps would be unexpectedly killed, usually just the browser but sometimes some android apps as well, when for example loading a heavy webpage. On JollaC this almost never happened to me, so it's strange that a device with more RAM has this problem.
For example (maybe an outdated/overkill example but proves the point) the Peacekeeper browser test (http://peacekeeper.futuremark.com/) always crashes at the fourth testing sequence.
To check if the lack of swap was really the culprit, I created a 1GB swap file in my home directory. After enabling the swap I ran the Peacekeeper test and this time it succeeded to finish the whole test. During the test around 450MB of swap was used. Another test with the swap disabled caused browser to be killed again, and once swap was enabled it went straight through, again. So my conclusion is that swap should be enabled for the Xperia X to ensure stability of the system/apps in heavy usage.
IIRC there isnt a swap-partition, the system-partition is too small for swap, and creating a new swap-partition is highly risky. But this can be solved by creating a swap-file in the home-partition which has the most space. 512MB or maybe even smaller (<400mb on JollaC) swap file is probably enough, so its not a huge sacrifice for the stability. Any thoughts?
edit. I had quite a lot of apps (my normal usage) open when I had the browser crash on the fourth sequence. On a fresh boot without other apps the total RAM usage is of course smaller and this test will not be enough to fill the RAM & kill the browser. So the testing method is not the best, but you get the point.
3 | No.3 Revision |
On my Xperia X (SFOS 2.1.3.7) I noticed that there is no swap at all. I always thought that no swap at all was a bad idea in general, and now after using the phone for a few weeks I've experienced some cases where apps would be unexpectedly killed, usually just the browser but sometimes some android apps as well, when for example loading a heavy webpage. On JollaC this almost never happened to me, so it's strange that a device with more RAM has this problem.
For example (maybe an outdated/overkill example but proves the point) the Peacekeeper browser test (http://peacekeeper.futuremark.com/) always crashes at the fourth testing sequence.sequence. (see edit)
To check if the lack of swap was really the culprit, I created a 1GB swap file in my home directory. After enabling the swap I ran the Peacekeeper test and this time it succeeded to finish the whole test. During the test around 450MB of swap was used. Another test with the swap disabled caused browser to be killed again, and once swap was enabled it went straight through, again. So my conclusion is that swap should be enabled for the Xperia X to ensure stability of the system/apps in heavy usage.
IIRC there isnt a swap-partition, the system-partition is too small for swap, and creating a new swap-partition is highly risky. But this can be solved by creating a swap-file in the home-partition which has the most space. 512MB or maybe even smaller (<400mb on JollaC) swap file is probably enough, so its not a huge sacrifice for the stability. Any thoughts?
edit. I had quite a lot of apps (my normal usage) open when I had the browser crash on the fourth sequence. On a fresh boot without other apps the total RAM usage is of course smaller and this test will not be enough to fill the RAM & kill the browser. So the testing method is not the best, but you get the point.