webkit2-gtk and RAM usage?
René J.V. Bertin
rjvbertin at gmail.com
Fri Apr 30 10:13:35 UTC 2021
Mostly out of curiosity I upgraded my GTk3 install (which I'd been keeping at the latest version still offering real theming, to 3.24.20) and webkit2-gtk (2.28.2); all "normally" against X11. I ran the antutu.com HTML5 benchmark in the webkit minibrowser app, left for a bit, and came back to a dialog I'd never seen before, warning me about virtua memory (swap) depletion. Indeed I had about 18Gb of swap on a root drive that has about 30Gb free at boot. Quitting applications nor logging out helped to reclaim that disk space, and running MemoryClean even increased the count to 20Gb before I decided to reboot.
I tried once more, now in epiphany (3.33.4); just loading the Instagram site gave me again 5Gb of swap files that I couldn't get rid of. The free RAM percentage also didn't go back to what it should be after quitting all applications (around 50%).
I remember the swap file reclaim issue from 10.6.x when I had 8 or 12Gb of RAM only. Now under 10.0.5 with 16Gb of RAM I was under the impression that I usually didn't have more than 2 or 3 swap files despite running several rather memory-hungry apps.
The experience outline above suggests that using webkit2-gtk somehow leaves processes behind (that I haven't been able to identify), doesn't properly release memory on exit (something I thought impossible on Unix) or simply that OS X's swap file implementation hasn't actually improved in the crucial functionality of being able to release swap space.
Does anyone have similar experiences with webkit2 (the same versions behave normally for me on Linux)? Is there a way other than rebooting to force the OS to reorganise and reclaim swap file space (on Linux you'd simply remove the swap device[s] and then add them again - supposing there's enough physical RAM to reclaim all swap space).
More information about the macports-users