From owner-freebsd-ports-bugs@freebsd.org Fri Sep 15 19:21:56 2017 Return-Path: Delivered-To: freebsd-ports-bugs@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 B99E6E043AA for ; Fri, 15 Sep 2017 19:21:56 +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 A7D1F75207 for ; Fri, 15 Sep 2017 19:21:56 +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 v8FJLt7Z072777 for ; Fri, 15 Sep 2017 19:21:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 222356] www/firefox: file-backed shared memory performance Date: Fri, 15 Sep 2017 19:21:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None 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: tijl@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 19:21:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222356 Bug ID: 222356 Summary: www/firefox: file-backed shared memory performance Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: gecko@FreeBSD.org Reporter: tijl@FreeBSD.org CC: alc@FreeBSD.org, kib@FreeBSD.org Assignee: gecko@FreeBSD.org Flags: maintainer-feedback?(gecko@FreeBSD.org) 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 a= lso removes recording of the inode because I don't think it's valid for shm_ope= n. --=20 You are receiving this mail because: You are the assignee for the bug.=