[SFOS Browser] Solving the browser memory issue

So I started running the tests, current setup is:

I accessed the website Visual Studio Code March 2023 which has a surprising one shot one kill effect and always kills my browser when opened. It’s my first time ever visiting this specific page.

Bellow my “journalctl -f”, i pasted the “full” log here: Framapad annuel

As you can see I open the browser (which previously crashed) at 17:09:13:

Mai 06 17:09:13 Xperia10II-DualSIM dbus-daemon[5957]: dbus-daemon[5957]: [session uid=100000 pid=5957] Activating service name='org.sailfishos.browser.ui' requested by ':1.5520' (uid=100000 pid=25032 comm="/usr/libexec/mliteremoteaction org.sailfishos.brow" label="u:r:kernel:s0")

And 4 seconds later lowmemorykiller is killing stuff:

Mai 06 17:09:19 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'am.android:mqtt' (24015), adj 905,
                                              to free 47172kB on behalf of 'Cache2 I/O' (25167) because
                                              cache 744468kB is below limit 745120kB for oom_score_adj 529
Mai 06 17:09:19 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'stagram.android' (23854), adj 250,
                                              to free 153008kB on behalf of 'HwBinder:3134_1' (24676) because
                                              cache 652904kB is below limit 652960kB for oom_score_adj 147
Mai 06 17:09:20 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'id.ext.services' (22516), adj 100,
                                              to free 59600kB on behalf of 'Cache2 I/O' (25167) because
                                              cache 560784kB is below limit 560800kB for oom_score_adj 58
Mai 06 17:09:20 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'stagram.android' (25321), adj 0,
                                              to free 46920kB on behalf of 'pool-tracker-mi' (25022) because
                                              cache 464416kB is below limit 468640kB for oom_score_adj 0
Mai 06 17:09:20 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'maliit-server' (20203), adj 0,
                                              to free 54364kB on behalf of 'systemd-journal' (632) because
                                              cache 457108kB is below limit 468640kB for oom_score_adj 0
Mai 06 17:09:20 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'invoker' (25035), adj 0,
                                              to free 2400kB on behalf of 'VideoDecMsgThre' (25313) because
                                              cache 457108kB is below limit 468640kB for oom_score_adj 0

And finally the browser…

Mai 06 17:09:20 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (22258), adj 0,
                                              to free 384508kB on behalf of 'HwBinder:3134_5' (6054) because
                                              cache 456492kB is below limit 468640kB for oom_score_adj 0

At 19:09:07 (so before re-opening the browser after it crashed), my memory was shared between:

Memory at 2023-05-06T17:09:07.194
Memory details: 3.5 GiB total, 48.9 MiB free, 138.5 MiB buffers, 838.0 MiB cached (including 11.2 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         509.8 MiB SLAB (117.7 MiB reclaimable), 
                ~ 1.5 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 340.2 MiB free (33%)
Available:      1.2 GiB (35%) estimated by kernel
                1.1 GiB (32%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

    PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
  22258 booster [browse                                     21.6 MiB (1%)  [-1000, 0, 0]
   7451 tracker-miner-f                                     15.8 MiB (0%)  [-750, 0, 0]
  20290 memory-record                                       14.2 MiB (0%)  [-1000, 0, 0]
  25008 tracker-extract                                      9.2 MiB (0%)  [-750, 0, 0]
   6293 pulseaudio                                           7.7 MiB (0%)  [-750, 0, 0]
   6035 xt9-server                                           6.5 MiB (0%)  [-750, 0, 0]
   5902 systemd                                              2.5 MiB (0%)  [-750, 0, 0]
   5957 dbus-daemon                                          1.7 MiB (0%)  [-750, 0, 0]
   6408 dconf-service                                        1.6 MiB (0%)  [-750, 0, 0]
   6041 ngfd                                                 1.4 MiB (0%)  [-750, 0, 0]
  14141 alienkeyboardse                                    901.0 KiB (0%)  [-750, 0, 0]
   6687 0                                                  840.0 KiB (0%)  [-1000, 0, 0]
  14105 alienaudioservi                                    705.0 KiB (0%)  [-750, 0, 0]
   7048 booster-browser                                    417.0 KiB (0%)  [-1000, 0, 0]
  22545 invoker                                            388.0 KiB (0%)  [-750, 0, 0]
  21999 bash                                               339.0 KiB (0%)  [-1000, 0, 0]
  15270 bash                                               332.0 KiB (0%)  [-1000, 0, 0]
  21727 bash                                               322.0 KiB (0%)  [-1000, 0, 0]
  21879 bash                                               321.0 KiB (0%)  [-1000, 0, 0]
   6625 mpris-proxy                                        292.0 KiB (0%)  [-750, 0, 0]
   6031 profiled                                           228.0 KiB (0%)  [-750, 0, 0]
  21816 grep                                               217.0 KiB (0%)  [-1000, 0, 0]
   6493 audiosystem-pas                                     76.0 KiB (0%)  [-750, 0, 0]
   5954 ohm-session-age                                     33.0 KiB (0%)  [-750, 0, 0]
  14174 invoker                                             26.0 KiB (0%)  [-750, 0, 0]
   6688 invoker                                             25.0 KiB (0%)  [-750, 0, 0]
   6635 invoker                                             25.0 KiB (0%)  [-250, 0, 0]
   6220 invoker                                             24.0 KiB (0%)  [-750, 0, 0]
  14249 invoker                                             24.0 KiB (0%)  [-750, 0, 0]
   6028 invoker                                             24.0 KiB (0%)  [-750, 0, 0]

        others                                             295.0 KiB (0%)
        sum                                                 88.1 MiB (2%)

At 17:09:17 (while lowmemorykiller was slaughtering) it was:

Memory at 2023-05-06T17:09:17.192
Memory details: 3.5 GiB total, 18.5 MiB free, 138.9 MiB buffers, 837.1 MiB cached (including 12.1 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         510.0 MiB SLAB (117.8 MiB reclaimable), 
                ~ 1.4 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 340.5 MiB free (33%)
Available:      1.1 GiB (33%) estimated by kernel
                1.1 GiB (31%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

    PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
  22258 booster [browse                                    250.1 MiB (7%)
  25037 booster [browse                                     20.8 MiB (1%)  [-1000, 0, 0]
   7451 tracker-miner-f                                     15.9 MiB (0%)  [-750, 0, 0]
  20290 memory-record                                       14.3 MiB (0%)  [-1000, 0, 0]
   6293 pulseaudio                                           7.7 MiB (0%)  [-750, 0, 0]
   6035 xt9-server                                           6.5 MiB (0%)  [-750, 0, 0]
   5902 systemd                                              2.6 MiB (0%)  [-750, 0, 0]
   5957 dbus-daemon                                          1.7 MiB (0%)  [-750, 0, 0]
   6408 dconf-service                                        1.6 MiB (0%)  [-750, 0, 0]
   6041 ngfd                                                 1.4 MiB (0%)  [-750, 0, 0]
  14141 alienkeyboardse                                    897.0 KiB (0%)  [-750, 0, 0]
   6687 0                                                  845.0 KiB (0%)  [-1000, 0, 0]
  14105 alienaudioservi                                    702.0 KiB (0%)  [-750, 0, 0]
  25035 invoker                                            401.0 KiB (0%)
  22545 invoker                                            366.0 KiB (0%)  [-750, 0, 0]
   7048 booster-browser                                    348.0 KiB (0%)  [-1000, 0, 0]
  21999 bash                                               339.0 KiB (0%)  [-1000, 0, 0]
  15270 bash                                               332.0 KiB (0%)  [-1000, 0, 0]
  21727 bash                                               322.0 KiB (0%)  [-1000, 0, 0]
  21879 bash                                               321.0 KiB (0%)  [-1000, 0, 0]
   6625 mpris-proxy                                        292.0 KiB (0%)  [-750, 0, 0]
   6031 profiled                                           228.0 KiB (0%)  [-750, 0, 0]
  21816 grep                                               217.0 KiB (0%)  [-1000, 0, 0]
   6493 audiosystem-pas                                     76.0 KiB (0%)  [-750, 0, 0]
   5954 ohm-session-age                                     33.0 KiB (0%)  [-750, 0, 0]
  14174 invoker                                             26.0 KiB (0%)  [-750, 0, 0]
   6688 invoker                                             25.0 KiB (0%)  [-750, 0, 0]
   6635 invoker                                             25.0 KiB (0%)  [-250, 0, 0]
   6034 invoker                                             24.0 KiB (0%)  [-750, 0, 0]
   6934 invoker                                             24.0 KiB (0%)  [-500, 0, 0]

        others                                             316.0 KiB (0%)
        sum                                                328.5 MiB (9%)

And at 17:09:22 (after the browser crashed) :

Memory at 2023-05-06T17:09:22.195
Memory details: 3.5 GiB total, 237.5 MiB free, 90.9 MiB buffers, 412.4 MiB cached (including 10.3 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         497.9 MiB SLAB (106.9 MiB reclaimable), 
                ~ 1.9 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 330.7 MiB free (32%)
Available:      882.0 MiB (25%) estimated by kernel
                837.4 MiB (24%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

    PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
  25037 booster [browse                                     24.6 MiB (1%)  [-1000, 0, 0]
   7451 tracker-miner-f                                     15.6 MiB (0%)  [-750, 0, 0]
  20290 memory-record                                       14.5 MiB (0%)  [-1000, 0, 0]
  25341 tracker-extract                                      9.5 MiB (0%)  [-750, 0, 0]
   6293 pulseaudio                                           7.6 MiB (0%)  [-750, 0, 0]
   6035 xt9-server                                           6.1 MiB (0%)  [-750, 0, 0]
   5902 systemd                                              2.5 MiB (0%)  [-750, 0, 0]
   5957 dbus-daemon                                          1.7 MiB (0%)  [-750, 0, 0]
   6408 dconf-service                                        1.6 MiB (0%)  [-750, 0, 0]
   6041 ngfd                                                 1.4 MiB (0%)  [-750, 0, 0]
   6687 0                                                  844.0 KiB (0%)  [-1000, 0, 0]
  14141 alienkeyboardse                                    832.0 KiB (0%)  [-750, 0, 0]
  14105 alienaudioservi                                    706.0 KiB (0%)  [-750, 0, 0]
   7048 booster-browser                                    423.0 KiB (0%)  [-1000, 0, 0]
  15270 bash                                               322.0 KiB (0%)  [-1000, 0, 0]
  21727 bash                                               317.0 KiB (0%)  [-1000, 0, 0]
  21999 bash                                               317.0 KiB (0%)  [-1000, 0, 0]
  21879 bash                                               314.0 KiB (0%)  [-1000, 0, 0]
   6625 mpris-proxy                                        292.0 KiB (0%)  [-750, 0, 0]
  21816 grep                                               209.0 KiB (0%)  [-1000, 0, 0]
   6031 profiled                                           208.0 KiB (0%)  [-750, 0, 0]
   6493 audiosystem-pas                                     76.0 KiB (0%)  [-750, 0, 0]
   5954 ohm-session-age                                     33.0 KiB (0%)  [-750, 0, 0]
   6635 invoker                                             26.0 KiB (0%)  [-250, 0, 0]
  14174 invoker                                             26.0 KiB (0%)  [-750, 0, 0]
   6688 invoker                                             25.0 KiB (0%)  [-750, 0, 0]
   6034 invoker                                             24.0 KiB (0%)  [-750, 0, 0]
   6037 invoker                                             24.0 KiB (0%)  [-750, 0, 0]
   6934 invoker                                             24.0 KiB (0%)  [-500, 0, 0]
   6616 invoker                                             24.0 KiB (0%)  [-750, 0, 0]

        others                                             271.0 KiB (0%)
        sum                                                 90.3 MiB (3%)

That’s the first information I found, I wonder what steps can I do next so we can get further on this topic ?

3 Likes

This setup is:

  • Xperia 10II, build 4.5.0.19
  • Using the 4G to access internet (in case that has some influence).
  • Browser has 1 active tabs (Visual Studio Code March 2023)
  • i disabled android and my emoji keyboard which was spamming the logs when there was a crash.

Full journalctl logs are here: Framapad annuel

By the way, this error:
binder: 2795:2795 transaction failed 29189/-22, size 32-0 line 3096 is when I hold the CTRL key before doing a CTRL + c

In this scenario I closed the browser, ran memory-peak --measurement-time "2023-05-06T17:47:30 before opening:

Memory at 2023-05-06T17:47:07.191
Memory details: 3.5 GiB total, 291.7 MiB free, 16.5 MiB buffers, 423.1 MiB cached (including 3.2 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         444.3 MiB SLAB (84.0 MiB reclaimable), 
                ~ 2.1 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 504.1 MiB free (49%)
Available:      863.7 MiB (24%) estimated by kernel
                812.0 MiB (23%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

    PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
   7451 tracker-miner-f                                     15.8 MiB (0%)  [-750, 0, 0]
  20290 memory-record                                       13.8 MiB (0%)  [-1000, 0, 0]
   6293 pulseaudio                                           8.3 MiB (0%)  [-750, 0, 0]
   6035 xt9-server                                           2.9 MiB (0%)  [-750, 0, 0]
   5902 systemd                                              2.7 MiB (0%)  [-750, 0, 0]
  32673 booster [browse                                      2.7 MiB (0%)  [-1000, 0, 0]
   5957 dbus-daemon                                          1.7 MiB (0%)  [-750, 0, 0]
   6041 ngfd                                                 1.7 MiB (0%)  [-750, 0, 0]
   6408 dconf-service                                        1.6 MiB (0%)  [-750, 0, 0]
   6687 0                                                  827.0 KiB (0%)  [-1000, 0, 0]
  21999 bash                                               398.0 KiB (0%)  [-1000, 0, 0]
  25465 invoker                                            342.0 KiB (0%)  [-750, 0, 0]
   7048 booster-browser                                    302.0 KiB (0%)  [-1000, 0, 0]
   6625 mpris-proxy                                        288.0 KiB (0%)  [-750, 0, 0]
  21727 bash                                               274.0 KiB (0%)  [-1000, 0, 0]
  15270 bash                                               235.0 KiB (0%)  [-1000, 0, 0]
  21816 grep                                               198.0 KiB (0%)  [-1000, 0, 0]
   6031 profiled                                           177.0 KiB (0%)  [-750, 0, 0]
   6493 audiosystem-pas                                     59.0 KiB (0%)  [-750, 0, 0]
  21879 bash                                                47.0 KiB (0%)  [-1000, 0, 0]
   5954 ohm-session-age                                     33.0 KiB (0%)  [-750, 0, 0]
   7443 invoker                                             25.0 KiB (0%)  [-750, 0, 0]
   6688 invoker                                             22.0 KiB (0%)  [-750, 0, 0]
   6037 invoker                                             22.0 KiB (0%)  [-750, 0, 0]
   6634 invoker                                             22.0 KiB (0%)  [-500, 0, 0]
   6635 invoker                                             22.0 KiB (0%)  [-250, 0, 0]
   6934 invoker                                             21.0 KiB (0%)  [-500, 0, 0]
   6616 invoker                                             21.0 KiB (0%)  [-750, 0, 0]
   6220 invoker                                             21.0 KiB (0%)  [-750, 0, 0]
   6028 invoker                                             21.0 KiB (0%)  [-750, 0, 0]

        others                                             155.0 KiB (0%)
        sum                                                 54.6 MiB (2%)

Opened the browser at Mai 06 17:47:28 Xperia10II-DualSIM dbus-daemon[5957]: dbus-daemon[5957]: [session uid=100000 pid=5957] Activating service name='org.sailfishos.browser.ui' requested by ':1.5719' (uid=100000 pid=1176 comm="/usr/libexec/mliteremoteaction org.sailfishos.brow" label="u:r:kernel:s0")

It almost loaded the page fully and then:

Mai 06 17:47:38 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'invoker' (1179), adj 0,
                                              to free 2620kB on behalf of 'sailfish-browse' (32673) because
                                              cache 103916kB is below limit 468640kB for oom_score_adj 0
Mai 06 17:47:38 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (32673), adj 0,
                                              to free 567648kB on behalf of 'threaded-ml' (1398) because
                                              cache 103916kB is below limit 468640kB for oom_score_adj 0

Memory peak at 17:47:37.199 (so when the browser page was loading) shows:

Memory at 2023-05-06T17:47:37.199
Memory details: 3.5 GiB total, 45.3 MiB free, 7.3 MiB buffers, 176.4 MiB cached (including 5.2 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         442.3 MiB SLAB (81.0 MiB reclaimable), 
                ~ 2.2 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 498.7 MiB free (49%)
Available:      260.9 MiB (7%) estimated by kernel
                304.9 MiB (9%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

    PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
  32673 booster [browse                                    604.8 MiB (17%)
   1181 booster [browse                                     18.1 MiB (1%)  [-1000, 0, 0]
  20290 memory-record                                       14.0 MiB (0%)  [-1000, 0, 0]
   7451 tracker-miner-f                                     13.6 MiB (0%)  [-750, 0, 0]
   6293 pulseaudio                                           9.2 MiB (0%)  [-750, 0, 0]
   5902 systemd                                              2.4 MiB (0%)  [-750, 0, 0]
   5957 dbus-daemon                                          1.7 MiB (0%)  [-750, 0, 0]
   6408 dconf-service                                        1.6 MiB (0%)  [-750, 0, 0]
   6041 ngfd                                                 1.4 MiB (0%)  [-750, 0, 0]
   6035 xt9-server                                           1.3 MiB (0%)  [-750, 0, 0]
   6687 0                                                  862.0 KiB (0%)  [-1000, 0, 0]
   1179 invoker                                            366.0 KiB (0%)
  21999 bash                                               357.0 KiB (0%)  [-1000, 0, 0]
  25465 invoker                                            339.0 KiB (0%)  [-750, 0, 0]
   6625 mpris-proxy                                        288.0 KiB (0%)  [-750, 0, 0]
  21727 bash                                               252.0 KiB (0%)  [-1000, 0, 0]
  15270 bash                                               235.0 KiB (0%)  [-1000, 0, 0]
   7048 booster-browser                                    232.0 KiB (0%)  [-1000, 0, 0]
  21816 grep                                               197.0 KiB (0%)  [-1000, 0, 0]
   6031 profiled                                           177.0 KiB (0%)  [-750, 0, 0]
   6493 audiosystem-pas                                     57.0 KiB (0%)  [-750, 0, 0]
  21879 bash                                                47.0 KiB (0%)  [-1000, 0, 0]
   5954 ohm-session-age                                     31.0 KiB (0%)  [-750, 0, 0]
   7443 invoker                                             23.0 KiB (0%)  [-750, 0, 0]
   6634 invoker                                             22.0 KiB (0%)  [-500, 0, 0]
   6635 invoker                                             22.0 KiB (0%)  [-250, 0, 0]
   6688 invoker                                             21.0 KiB (0%)  [-750, 0, 0]
   6028 invoker                                             21.0 KiB (0%)  [-750, 0, 0]
   6034 invoker                                             21.0 KiB (0%)  [-750, 0, 0]
   6616 invoker                                             21.0 KiB (0%)  [-750, 0, 0]

        others                                             191.0 KiB (0%)
        sum                                                671.9 MiB (19%)
3 Likes

Hi all. Is here some guru who knows Linux memory management? I’m author of memory watcher tool, I read many sources about memory, but still cannot say properly how available memory is distributed. Problem for me is this computation: anonymous memory of user-space processes + slab + free value + buffers + caches + swap cache is usually less than total system memory. What allocator owns it? Do I overlook some value?

3 Likes

It’s a lot of work, but when analyzing memory usage in the past, I’ve used pidstat for pid level memory usage logging. It’s in the systat packages, usually. I did run it on SFOS. pidstat(1) - Linux manual page

2 Likes

I found something new that seems to help:

apz.autoscroll.enabled: off
apz.disable_for_scroll_linked_effects: on

edit: browser.cache.disk.max_entry_size: 4096 → 1024

I can’t imagine that a max. entry size of 4096 is good while the cache has only 1024 in size by default.

feedback is very welcome!

1 Like

I’m trying that tomorrow, and also your tip from the other thread

1 Like

Does anyone have an idea how we can benchmark this? maybe select a few sites and do a few testruns from a clean state?

If we had a testprotocol, we could get an objective insight into what acutally helps.

4 Likes

FWIW www.bangkokpost.com will crash the browser every time today on my 10iii 4.5.0.19

Works fine at the modified Volla.

edit: All quiet on the Mekong front :wink: but unfortunately Chiang Mai tourism hit by smog.

1 Like

I went to your post about changes you made via about:config

Sadly, when I entered this in my browser, the result was not encouraging. There was no obvious way past this

Edit: There is an invisible “Accept” button on the right of the top bar. Tricky.

“edit: browser.cache.disk.max_entry_size: 4096 → 1024”

On my 10iii this value is set to 40960 as is the …free_space_soft_limit

That’s a swipe-to-accept like all the other dialogs throughout the OS. Sure, you can tap it, but that’s not how it’s meant to be used.

Works fine on mine. No settings changed, just a basic hostfile block in place - not that i think it matters.

It’s also meant to have text on it … and unless you are running a 10iii on 4.5.0.19 your experience isn’t that relevant

I am.    

1 Like

Strange.

My setup is bog standard with no tweaks of any kind as far as I remember.

Hostfile blocks can make plenty of difference. Try turning it off and see if it alters behaviour

That didn’t make any difference. That site doesn’t seem to have very many ads.

I have changed Browser to ANGELFISH …all OK!!!

I charged up my old XperiaX with 4.4.x on it, and it loaded OK, but much slower, obviously. This is pretty strange.

Update: It worked yesterday on the 10iii after the headline changed. Hmmm, very strange

So, same benchmark as before:

  • Xperia 10II, build 4.5.0.19
  • Using the 4G to access internet (in case that has some influence).
  • Browser has 0 active tabs.
  • Browser is still default config, no change in the about:config.
  • Browsing: Visual Studio Code March 2023

First test was following @Seven.of.nine tip on another thread:

The scenario:

  • I opened DeadBeef Silica
  • Played one song for a few seconds
  • Opened the browser

Spoiler alert, did not work. The browser crashed with the music app with it:

Mai 15 20:19:37 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'deadbeef-main' (27362), adj 100,
                                              to free 69368kB on behalf of 'VideoDecMsgThre' (28661) because
                                              cache 560400kB is below limit 560800kB for oom_score_adj 58
                                              Free memory is 309744kB above reserved.
                                              Free CMA is 16016kB
                                              Total reserve is 18680kB
                                              Total free pages is 28216kB
                                              Total file cache is 605596kB
                                              Slab Reclaimable is 116408kB
                                              Slab UnReclaimable is 452048kB
                                              Total Slab is 568456kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 376kB
                                              Free Swap 316520kB
                                              queue len is 1 of max 1 reason:0x2 margin:-1788
Mai 15 20:19:37 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'id.ext.services' (25665), adj 100,
                                              to free 55600kB on behalf of 'HwBinder:3134_4' (6053) because
                                              cache 559432kB is below limit 560800kB for oom_score_adj 58
                                              Free memory is 311768kB above reserved.
                                              Free CMA is 23744kB
                                              Total reserve is 18680kB
                                              Total free pages is 37372kB
                                              Total file cache is 605008kB
                                              Slab Reclaimable is 116208kB
                                              Slab UnReclaimable is 452048kB
                                              Total Slab is 568256kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 376kB
                                              Free Swap 316444kB
                                              queue len is 1 of max 1 reason:0x2 margin:-1263
Mai 15 20:19:37 Xperia10II-DualSIM kernel: oom_reaper: reaped process 27362 (deadbeef-main), now anon-rss:0kB, file-rss:268kB, shmem-rss:272kB
Mai 15 20:19:37 Xperia10II-DualSIM kernel: oom_reaper: reaped process 25665 (id.ext.services), now anon-rss:0kB, file-rss:0kB, shmem-rss:112kB
Mai 15 20:19:38 Xperia10II-DualSIM booster-generic[5952]: *** signal=17 pid=5952
Mai 15 20:19:38 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-generic[5952]: warning: boosted process (pid=27362) signal(Killed)
Mai 15 20:19:38 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-generic[5952]: warning: Daemon: sending exit(1) to invoker(28411)
Mai 15 20:19:38 Xperia10II-DualSIM invoker[28411]: warning: application (pid=-1) exit(1) signal(0)
Mai 15 20:19:38 Xperia10II-DualSIM kernel: BUG: Bad rss-counter state mm:ffffffc0c061b800 idx:4 val:3054
Mai 15 20:19:38 Xperia10II-DualSIM lipstick[6159]: [D] onDestruction:268 - coverActionIndicators destroyed deadbeef-silica.desktop
Mai 15 20:19:38 Xperia10II-DualSIM dbus-daemon[1725]: [system] Rejected send message, 2 matched rules; type="error", sender=":1.61" (uid=100000 pid=6159 comm="/usr/bin/lipstick -plugin evdevtouch -plugin evdev" label="u:r:kernel:s0") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.3" (uid=0 pid=2668 comm="/usr/sbin/ohmd --no-daemon --mlock=none" label="u:r:kernel:s0")
Mai 15 20:19:38 Xperia10II-DualSIM dbus-daemon[1725]: dbus-daemon[1725]: [system] Rejected send message, 2 matched rules; type="error", sender=":1.61" (uid=100000 pid=6159 comm="/usr/bin/lipstick -plugin evdevtouch -plugin evdev" label="u:r:kernel:s0") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.3" (uid=0 pid=2668 comm="/usr/sbin/ohmd --no-daemon --mlock=none" label="u:r:kernel:s0")
Mai 15 20:19:38 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (25220), adj 0,
                                              to free 377880kB on behalf of 'HwBinder:3134_4' (6053) because
                                              cache 468620kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 315268kB above reserved.
                                              Free CMA is 32312kB
                                              Total reserve is 18680kB
                                              Total free pages is 54304kB
                                              Total file cache is 512572kB
                                              Slab Reclaimable is 111104kB
                                              Slab UnReclaimable is 453372kB
                                              Total Slab is 564476kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 1358kB
                                              Free Swap 311852kB
                                              queue len is 1 of max 1 reason:0x2 margin:492
Mai 15 20:19:38 Xperia10II-DualSIM kernel: binder: 25220:28691 ioctl c0306201 70ed3e94a0 returned -14
Mai 15 20:19:38 Xperia10II-DualSIM kernel: oom_reaper: reaped process 25220 (sailfish-browse), now anon-rss:0kB, file-rss:77288kB, shmem-rss:340kB

And i also tried this, first one option at the time, then all three together, all options lead to browser crash:

apz.autoscroll.enabled: off

Mai 15 20:33:03 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'maliit-server' (23533), adj 0,
                                              to free 84468kB on behalf of 'kworker/u16:1' (30350) because
                                              cache 463536kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 291880kB above reserved.
                                              Free CMA is 13200kB
                                              Total reserve is 18680kB
                                              Total free pages is 25076kB
                                              Total file cache is 512872kB
                                              Slab Reclaimable is 113688kB
                                              Slab UnReclaimable is 452912kB
                                              Total Slab is 566600kB
                                              GFP mask is 0x14142c0
                                              Indirect Reclaimable is 2401kB
                                              Free Swap 295540kB
                                              queue len is 1 of max 1 reason:0x2 margin:-1515
Mai 15 20:33:03 Xperia10II-DualSIM gecko-camera[30368]: droid-codec configureOutput:766 -- Configuring converter for stride:1920 slice-height: 1080 top: 0 left:0 width: 1920 height: 1080 format: 2141391876
Mai 15 20:33:03 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (30368), adj 0,
                                              to free 431896kB on behalf of 'VideoDecMsgThre' (895) because
                                              cache 458196kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 327644kB above reserved.
                                              Free CMA is 17944kB
                                              Total reserve is 18680kB
                                              Total free pages is 68248kB
                                              Total file cache is 508020kB
                                              Slab Reclaimable is 113688kB
                                              Slab UnReclaimable is 453708kB
                                              Total Slab is 567396kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 2401kB
                                              Free Swap 295372kB
                                              queue len is 1 of max 1 reason:0x2 margin:7464
Mai 15 20:33:03 Xperia10II-DualSIM kernel: oom_reaper: reaped process 23533 (maliit-server), now anon-rss:0kB, file-rss:2472kB, shmem-rss:128kB

apz.disable_for_scroll_linked_effects: on

Mai 15 20:35:03 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'maliit-server' (32343), adj 0,
                                              to free 87248kB on behalf of 'VideoDecMsgThre' (2090) because
                                              cache 465828kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 303036kB above reserved.
                                              Free CMA is 264kB
                                              Total reserve is 18680kB
                                              Total free pages is 16932kB
                                              Total file cache is 516488kB
                                              Slab Reclaimable is 108232kB
                                              Slab UnReclaimable is 452516kB
                                              Total Slab is 560748kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 2410kB
                                              Free Swap 302764kB
                                              queue len is 1 of max 1 reason:0x2 margin:-534
Mai 15 20:35:03 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (1025), adj 0,
                                              to free 454168kB on behalf of 'HwBinder:2736_3' (1436) because
                                              cache 465436kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 323988kB above reserved.
                                              Free CMA is 10220kB
                                              Total reserve is 18680kB
                                              Total free pages is 50356kB
                                              Total file cache is 516292kB
                                              Slab Reclaimable is 108192kB
                                              Slab UnReclaimable is 452516kB
                                              Total Slab is 560708kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 2410kB
                                              Free Swap 302720kB
                                              queue len is 1 of max 1 reason:0x2 margin:4714
                                              
browser.cache.disk.max_entry_size: 4096 → 1024                                  
                                              
Mai 15 20:38:26 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'maliit-server' (952), adj 0,
                                              to free 83604kB on behalf of 'Compositor' (2959) because
                                              cache 466248kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 269760kB above reserved.
                                              Free CMA is 4844kB
                                              Total reserve is 18680kB
                                              Total free pages is 20608kB
                                              Total file cache is 517916kB
                                              Slab Reclaimable is 111888kB
                                              Slab UnReclaimable is 453220kB
                                              Total Slab is 565108kB
                                              GFP mask is 0x14000c2
                                              Indirect Reclaimable is 409kB
                                              Free Swap 272264kB
                                              queue len is 1 of max 1 reason:0x2 margin:-729
Mai 15 20:38:26 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (2363), adj 0,
                                              to free 433472kB on behalf of 'VideoDecMsgThre' (3703) because
                                              cache 463056kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 277684kB above reserved.
                                              Free CMA is 4720kB
                                              Total reserve is 18680kB
                                              Total free pages is 30768kB
                                              Total file cache is 514708kB
                                              Slab Reclaimable is 111884kB
                                              Slab UnReclaimable is 453096kB
                                              Total Slab is 564980kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 409kB
                                              Free Swap 272180kB
                                              queue len is 1 of max 1 reason:0x2 margin:1262
Mai 15 20:38:26 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'invoker' (2912), adj 0,
                                              to free 2528kB on behalf of 'HwBinder:3134_4' (6053) because
                                              cache 460904kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 282780kB above reserved.
                                              Free CMA is 5392kB
                                              Total reserve is 18680kB
                                              Total free pages is 34480kB
                                              Total file cache is 512748kB
                                              Slab Reclaimable is 111884kB
                                              Slab UnReclaimable is 452896kB
                                              Total Slab is 564780kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 409kB
                                              Free Swap 272176kB
                                              queue len is 1 of max 1 reason:0x2 margin:2549

Memory performance during the last test :

Memory at 2023-05-15T20:38:22.701
Memory details: 3.5 GiB total, 25.7 MiB free, 110.7 MiB buffers, 940.6 MiB cached (including 19.6 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         565.4 MiB SLAB (123.0 MiB reclaimable), 
               ~ 1.2 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 295.0 MiB free (29%)
Available:      1.1 GiB (33%) estimated by kernel
               1.2 GiB (33%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

   PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
  2363 booster [browse                                    362.9 MiB (10%)
  2913 booster [browse                                     18.9 MiB (1%)  [-1000, 0, 0]
 22299 memory-record                                       16.4 MiB (0%)  [-1000, 0, 0]
  7451 tracker-miner-f                                     11.2 MiB (0%)  [-750, 0, 0]
  3571 tracker-extract                                      8.1 MiB (0%)  [-750, 0, 0]

All three together

Mai 15 20:42:35 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'id.ext.services' (3744), adj 100,
                                              to free 41588kB on behalf of 'HwBinder:2736_1' (2800) because
                                              cache 558380kB is below limit 560800kB for oom_score_adj 58
                                              Free memory is 277836kB above reserved.
                                              Free CMA is 16644kB
                                              Total reserve is 18680kB
                                              Total free pages is 33824kB
                                              Total file cache is 608892kB
                                              Slab Reclaimable is 121976kB
                                              Slab UnReclaimable is 453432kB
                                              Total Slab is 575408kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 2503kB
                                              Free Swap 278120kB
                                              queue len is 1 of max 1 reason:0x2 margin:-711
Mai 15 20:42:36 Xperia10II-DualSIM kernel: oom_reaper: reaped process 3744 (id.ext.services), now anon-rss:0kB, file-rss:0kB, shmem-rss:112kB
Mai 15 20:42:36 Xperia10II-DualSIM kernel: lowmemorykiller: Killing 'sailfish-browse' (4129), adj 0,
                                              to free 430012kB on behalf of 'HwBinder:3134_1' (10897) because
                                              cache 465764kB is below limit 468640kB for oom_score_adj 0
                                              Free memory is 268820kB above reserved.
                                              Free CMA is 17216kB
                                              Total reserve is 18680kB
                                              Total free pages is 29908kB
                                              Total file cache is 517040kB
                                              Slab Reclaimable is 116540kB
                                              Slab UnReclaimable is 454348kB
                                              Total Slab is 570888kB
                                              GFP mask is 0x14280c2
                                              Indirect Reclaimable is 1180kB
                                              Free Swap 272884kB
                                              queue len is 1 of max 1 reason:0x2 margin:-1311

Memory performance during this test

Memory at 2023-05-15T20:42:34.706
Memory details: 3.5 GiB total, 23.3 MiB free, 86.6 MiB buffers, 645.8 MiB cached (including 10.2 MiB shmem (tmpfs)), 0 B swap cache
Kernel:         563.5 MiB SLAB (120.4 MiB reclaimable), 
                ~ 1.6 GiB other kernel memory? It means: total - anonymous process - slab - free - buffers - cached - swap cache
Swap:           1024.0 MiB total, 280.0 MiB free (27%)
Available:      850.5 MiB (24%) estimated by kernel
                866.0 MiB (24%) computed. It means: free + buffers + (cached - Shmem) + swap cache + slab reclaimable

Processes memory (smaps Pss):

    PID process                                                 size (% of total)  [oom_adj, oom_score, oom_score_adj]
   4129 booster-browser                                    405.2 MiB (11%)
   4981 booster-browser                                     19.8 MiB (1%)  [-1000, 0, 0]
  22299 memory-record                                       16.6 MiB (0%)  [-1000, 0, 0]
   7451 tracker-miner-f                                     10.1 MiB (0%)  [-750, 0, 0]
   5263 tracker-extract                                      8.7 MiB (0%)  [-750, 0, 0]
   6035 xt9-server                                           6.4 MiB (0%)  [-750, 0, 0]
   6293 pulseaudio                                           5.5 MiB (0%)  [-750, 0, 0]
   5902 systemd                                              2.4 MiB (0%)  [-750, 0, 0]
   6408 dconf-service                                        1.8 MiB (0%)  [-750, 0, 0]
   5957 dbus-daemon                                          1.7 MiB (0%)  [-750, 0, 0]
   6041 ngfd                                                 1.4 MiB (0%)  [-750, 0, 0]
   6687 0                                                  858.0 KiB (0%)  [-1000, 0, 0]
  19302 alienkeyboardse                                    824.0 KiB (0%)  [-750, 0, 0]
  19278 alienaudioservi                                    684.0 KiB (0%)  [-750, 0, 0]


I hope this can enlighten some of you on ideas/tools to try next, either to measure the memory or the browser or hacking into understanding it.

4 Likes