[SailfishDevel] Keeping background process running in Sailfish OS

MARTIN GRIMME martin.grimme at gmail.com
Sun May 3 15:03:55 UTC 2015



Am 3. Mai 2015, um 16:39, schrieb "E.S. Rosenberg" <es.rosenberg+sailfishos.org at gmail.com>:

>
>
>Well for one thing you have the extremely RAM hungry Android environment which they didn't have...

On the other hand, the N900 and N9 could have become pretty unresponsive while swapping, up to the point that you were not able to answer the ringing phone in time.
So the way Maemo and Harmattan did it with a crazy amount of swapping was certainly not better.


Martin


>
>2015-05-03 17:16 GMT+03:00 Taixzo <taixzo at gmail.com>:
>I wonder why Sailfish OS does this while Harmattan and Maemo did not? They certainly didn't have more RAM to work with.
>
>Sunday, May 3, 2015 7:56 AM E.S. Rosenberg wrote:
>> Also note that if you skew it too much in favor of yourself the system may
>> end up killing genuinely important system processes instead of your daemon,
>> no user will be happy about that....
>>
>> 2015-05-03 14:43 GMT+03:00 Martin Grimme <martin.grimme at gmail.com>:
>>
>>> Hi,
>>>
>>> 2015-05-03 13:09 GMT+02:00, Andrey Kozhevnikov <coderusinbox at gmail.com>:
>>>> afaik it only closing propcesses with windows, no?
>>>
>>> No, it is the Linux OOM handler, which does not care or know about
>>> what a Wayland window is.
>>> If your daemon is invoked as a systemd service, you can adjust the
>>> OOMScore in the system .service file of the daemon, like this:
>>>
>>>   [Service]
>>>   ExecStart=/usr/sbin/mydaemon
>>>   OOMScoreAdjust=-250
>>>
>>> The lower the value the less likely the process will be selected by
>>> the OOM killer.
>>> However, if you want to remain harbour-compatible, you cannot run the
>>> daemon as a systemd service. In that case maybe you can write the
>>> score directly at runtime to
>>>
>>>   /proc/<your process pid>/oom_score_adj
>>>
>>> but I did not test that solution.
>>>
>>>
>>> Martin
>>> _______________________________________________
>>> SailfishOS.org Devel mailing list
>>> To unsubscribe, please send a mail to
>>> devel-unsubscribe at lists.sailfishos.org
>>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
>
>--
>Sent from Whiteout Mail - https://whiteout.io
>My PGP key: https://keys.whiteout.io/taixzo@gmail.com
>
>_______________________________________________
>SailfishOS.org Devel mailing list
>To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150503/f7828178/attachment-0001.html>


More information about the Devel mailing list