From owner-freebsd-gecko@freebsd.org Fri Sep 15 19:21:55 2017 Return-Path: Delivered-To: freebsd-gecko@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 E3D4CE0439E for ; Fri, 15 Sep 2017 19:21:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CC82E751FF for ; Fri, 15 Sep 2017 19:21:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id CBE30E0439D; Fri, 15 Sep 2017 19:21:55 +0000 (UTC) Delivered-To: gecko@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 CB8F0E0439C for ; Fri, 15 Sep 2017 19:21:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB03F751FD for ; Fri, 15 Sep 2017 19:21:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8FJLt7R072777 for ; Fri, 15 Sep 2017 19:21:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: gecko@FreeBSD.org Subject: maintainer-feedback requested: [Bug 222356] www/firefox: file-backed shared memory performance Date: Fri, 15 Sep 2017 19:21:54 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 19:21:56 -0000 Tijl Coosemans has reassigned Bugzilla Automation 's request for maintainer-feedback to gecko@FreeBSD.o= rg: Bug 222356: www/firefox: file-backed shared memory performance https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222356 --- Description --- Created attachment 186420 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D186420&action= =3Dedit firefox patch Multi-process firefox appears to use a lot of shared memory backed by files= on /tmp. If /tmp is not tmpfs but a regular file system this causes significa= nt delays. Scrolling pages can be slow for example. This can be improved by patching firefox to use MAP_NOSYNC which prevents dirty pages being flushed= to disc as long as they are mapped. When they are unmapped (and all descripto= rs have been closed) FreeBSD still flushes them though and there are several situations where firefox does this (e.g. switching between tabs and minimis= ing and restoring the browser window). The backing files have been unlinked so= why doesn't FreeBSD just discard the pages? I've attached a patch for firefox that works around this problem by using P= OSIX shared memory with shm_open for the case of anonymous shared memory. Named shared memory is left unchanged but doesn't appear to be used. The patch al= so removes recording of the inode because I don't think it's valid for shm_ope= n.