-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Describe the bug
Over time, memory consumption increases to about 1 - 1.5 GB per parent process, and does not decrease even after closing all tabs. If you select and close all these tabs, and then open them again, it will easily raise consumption to ~ 800 MB, after that growth slows down. The easiest and fastest way to reproduce this is to open several heavy tabs at the same time. (This list will take up more than six gigabytes at a time after the pages are fully loaded, so be careful).
https://habr.com/ru/company/vdsina/blog/528558/comments/
https://habr.com/ru/post/496234/comments/
https://habr.com/ru/post/483592/comments/
https://habr.com/ru/post/500926/comments/
https://habr.com/ru/post/512462/comments/
https://habr.com/ru/post/520574/comments/
https://habr.com/ru/post/516892/comments/
https://habr.com/ru/company/jugru/blog/493178/comments/
https://habr.com/ru/company/vdsina/blog/528558/comments/
https://habr.com/ru/company/vdsina/blog/526368/comments/
https://habr.com/ru/company/lsfusion/blog/468415/comments/
https://habr.com/ru/company/itsumma/blog/479942/comments/
https://habr.com/ru/post/438650/comments/
The official nightly build launched via lxd in debian 11, as well as the current version installed via flatpak, is not affected by this problem, in them the main process after the end of loading tabs decreases back to ~300 MB.
Here is a fragment of the output to make it clearer what it is about. In this case, you need to pay attention to the consumption of the process.
854913 pts/0 Ss 0:00 | \_ bash
1190951 pts/0 S+ 0:00 | | \_ /nix/store/v50k2msrp8c7qs652hjalhklw73rkvd5-bubblewrap-0.5.0/bin/bwrap --args 40 firefox --ProfileManager
1190961 pts/0 S+ 0:00 | | \_ /nix/store/v50k2msrp8c7qs652hjalhklw73rkvd5-bubblewrap-0.5.0/bin/bwrap --args 40 firefox --ProfileManager
1190962 pts/0 Sl+ 6:18 | | \_ /app/lib/firefox/firefox --ProfileManager
1191265 pts/0 Sl+ 0:02 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser 2 tr
1191316 pts/0 Sl+ 0:06 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 2 -isForBrowser -prefsLen 4773 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser 2
1191386 pts/0 Sl+ 1:07 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 3 -isForBrowser -prefsLen 5408 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser 2
1195491 pts/0 Sl+ 0:41 | | \_ /app/lib/firefox/firefox-bin -contentproc -parentBuildID 20211129150630 -prefsLen 5577 -prefMapSize 246035 -appDir /app/lib/firefox/browser 2 true rdd
1210052 pts/0 Sl+ 0:37 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 14 -isForBrowser -prefsLen 5577 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser
1211091 pts/0 Sl+ 0:00 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 15 -isForBrowser -prefsLen 5577 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser
1211531 pts/0 Sl+ 0:00 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 16 -isForBrowser -prefsLen 5577 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser
1212253 pts/0 Sl+ 0:00 | | \_ /app/lib/firefox/firefox-bin -contentproc -childID 17 -isForBrowser -prefsLen 5731 -prefMapSize 246035 -jsInitLen 278884 -parentBuildID 20211129150630 -appDir /app/lib/firefox/browser
In this case, it is a process 1190962. This browser run through flatpak and now it have some opened tabs.
Steps To Reproduce
Steps to reproduce the behavior:
- Open heavy tabs
Expected behavior
A browser installed via nix should not consume more memory than via flapak or lxd.
Notify maintainers
@edolstra @lovesegfault @mweinelt
Metadata
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 5.15.4, NixOS, 21.11 (Porcupine)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.16`
- channels(root): `"nixos-21.11.334247.573095944e7"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`