From owner-freebsd-ports@freebsd.org Wed Nov 1 20:10:17 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B394DE63560 for ; Wed, 1 Nov 2017 20:10:17 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 890377FB3F for ; Wed, 1 Nov 2017 20:10:17 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id DCC121F819; Wed, 1 Nov 2017 20:10:16 +0000 (UTC) From: Jan Beich To: freebsd-ports@FreeBSD.org Subject: Re: FireFox memory usage References: Date: Wed, 01 Nov 2017 21:10:13 +0100 In-Reply-To: (Jan Beich's message of "Fri, 15 Sep 2017 15:49:56 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 20:10:17 -0000 Jan Beich writes: > Andrea Venturoli writes: > >> Hello. >> >> I'm on 10.3/amd64 with firefox-esr 52.3.0. >> >> Since a few days my 4GiB desktop is crawling due to swap usage and >> looking at top, I see FireFox using almost 7GiB of RAM (SIZE column), >> 2.5 of which are "RES". > > Check about:memory and Devolper Tools -> Memory for clues. For more > advanced debugging (DMD, Refcount tracing) you'd need a custom build. > > Firefox on FreeBSD is known to consume more memory than on other > platforms because it uses system jemalloc rather than mozjemalloc. > Mozilla doesn't test memory usage without mozjemalloc. However, porting > mozjemalloc has stalled[1] unless someone helps. > > [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1153683 If one is on Firefox 55+ or FreeBSD 12+ while suboptimal compared to mozjemalloc the old jemalloc4 optimizations can be restored by $ MALLOC_CONF="narenas:1,tcache:false" firefox ... https://dxr.mozilla.org/mozilla-esr52/source/memory/build/jemalloc_config.cpp#35