Bug 244879

Summary: Does www/firefox on KDE have a memory leak?
Product: Ports & Packages Reporter: jdrch <judahrichardson>
Component: Individual Port(s)Assignee: freebsd-gecko (Nobody) <gecko>
Status: Closed Works As Intended    
Severity: Affects Some People CC: judahrichardson
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
KSysMonitor Screenshot none

Description jdrch 2020-03-18 05:14:56 UTC
Created attachment 212485 [details]
KSysMonitor Screenshot

Firefox appears to be using an inordinate amount of RAM on 12.1-RELEASE-p2 with the latest pkg repo enabled. Attached screenshot is RAM usage with 6 tabs open: Reddit, GitHub, Resilio Sync Forums, Stack Exchange, Bugzilla, and Glances documentation. Is this expected?
Comment 1 Jan Beich freebsd_committer freebsd_triage 2020-03-18 05:27:57 UTC
Comment on attachment 212485 [details]
KSysMonitor Screenshot

Memory usage looks fine to me i.e., parent/main process tends to use more than child processes (web content, extensions, etc). mozjemalloc (a heavily modified version of jemalloc) hasn't been ported to FreeBSD or any other BSD, so each "firefox" process uses more memory than on Linux.

If you want to reduce memory usage at the cost of performance try starting like

  $ MALLOC_CONF="narenas:1,tcache:false" firefox
Comment 2 jdrch 2020-03-18 05:33:23 UTC
(In reply to Jan Beich from comment #1)
Ah that would make sense, then. Thanks! I guess this can be closed.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2020-03-18 06:00:25 UTC
All the missing features are (supposed to be) documented in pkg-message. I've tried to port mozjemalloc long ago but gave up.

https://bugzilla.mozilla.org/show_bug.cgi?id=1153683