Closed Bug 1479577 Opened 7 years ago Closed 7 years ago

Firefox Quantum worker processes seem unswappable

Categories

(Core :: Memory Allocator, defect)

61 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: nemesis, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 Build ID: 20180704003137 Steps to reproduce: Observed in atop (SWAPSZ is 0 for all content procs) and via pmap -XX that 'Web Content' worker processes have a large amount of locked memory. $ ps ax | grep firefox.*contentproc | grep -v grep | awk '{print $1}' | while read PID; do ps ax | grep "^\s*${PID}" | grep -v grep; sudo pmap -x /proc/${PID} | grep 'anon' | sort -g -k3 | tail -10 | cut -f1 -d\ | sed 's/^0*//' | xargs -I{} sh -c "sudo pmap -XX /proc/${PID} | sed 's/\s\+/ /g' | grep {} | cut -f2,25 -d\ "; done 4302 ? Sl 397:21 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 88354 -schedulerPrefs 0001,2 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 3207 true tab 7f88d4a00000 8412 7f888f700000 8568 7f88e7800000 9056 7f88ae600000 9228 7f88a8300000 9488 7f88e8700000 9824 7f88dbd00000 10316 7f88d7700000 10604 7f88d5500000 16856 7f88dd100000 25196 11696 ? Sl 14:04 /usr/lib/firefox/firefox -contentproc -childID 50 -isForBrowser -prefsLen 88348 -schedulerPrefs 0001,2 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 3207 true tab 7ffbaf000000 6116 7ffb94a00000 6144 7ffbab000000 7116 7ffba4900000 10132 7ffb97aff000 23464 7ffba5500000 33620 7ffb90800000 36104 7ffba7900000 38756 7ffbac000000 40840 7ffb997ff000 115016 28583 ? Sl 0:01 /usr/lib/firefox/firefox -contentproc -childID 51 -isForBrowser -prefsLen 88348 -schedulerPrefs 0001,2 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 3207 true tab 7fe20c52c000 24 ebdb164d000 128 7fe2004c9000 180 7fe1f1600000 280 7fe20a700000 908 7fe1f5700000 992 7fe1efb00000 2608 7fe1f2400000 3864 7fe1f0900000 4040 7fe1edc00000 4104 Actual results: It seems pages belonging to the heap of worker processes cannot be swapped out, creating global memory pressure and swapstorms on low memory (8GB) systems. Expected results: Is this done for an articulable reason? Is my analysis wrong?
Component: Untriaged → Memory Allocator
Product: Firefox → Core
I don't know what Locked means in /proc/$pid/smaps when VmFlags doesn't contain `lo`, and I see no such regions in my running Firefox. I'll just note that a simple program that does `mmap()` followed by `memset()` ends up in the same state: Locked with a large value, but no `lo` in VmFlags. So it would seem like this is not actually a problem.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Thanks for investigating. Could you speculate as to why the worker processes refuse to swap even under pressure? This is very frustrating on a system with 8GB or less.
You need to log in before you can comment on or make changes to this bug.