From owner-freebsd-bugs@freebsd.org Sat Aug 11 02:47:05 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 112C01059FC7 for ; Sat, 11 Aug 2018 02:47:05 +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 A025E873C2 for ; Sat, 11 Aug 2018 02:47:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 60D241059FC6; Sat, 11 Aug 2018 02:47:04 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F88E1059FC5 for ; Sat, 11 Aug 2018 02:47:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5575873BF for ; Sat, 11 Aug 2018 02:47:03 +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 mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 48E57C947 for ; Sat, 11 Aug 2018 02:47:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w7B2l3Ki082913 for ; Sat, 11 Aug 2018 02:47:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w7B2l397082912 for bugs@FreeBSD.org; Sat, 11 Aug 2018 02:47:03 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 230491] stat(1): Improve performance with getpwuid() and getgrgid() caching Date: Sat, 11 Aug 2018 02:47:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: needs-qa, patch, performance X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cem@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: mfc-stable10? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-bugs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 02:47:05 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230491 --- Comment #11 from Conrad Meyer --- Here's my non-scientific results for my proposed patch (on CURRENT GENERIC, i.e., WITNESS and INVARIANTS are on, which introduces wider error bars than without, but still): BEFORE conrad@n /u/s/u/stat =E2=9D=AF=E2=9D=AF=E2=9D=AF time (find /usr/src -type = f -print0 | xargs -0 stat >/dev/null) ( find /usr/src -type f -print0 | xargs -0 stat > /dev/null; ) 3.62s user 5.23s system 102% cpu 8.655 total conrad@n /u/s/u/stat =E2=9D=AF=E2=9D=AF=E2=9D=AF time (find /usr/src -type = f -print0 | xargs -0 stat >/dev/null) ( find /usr/src -type f -print0 | xargs -0 stat > /dev/null; ) 3.47s user 5.38s system 102% cpu 8.647 total AFTER conrad@n /u/s/u/stat =E2=9D=AF=E2=9D=AF=E2=9D=AF time (find /usr/src -type = f -print0 | xargs -0 $(make -V .OBJDIR)/stat >/dev/null) ( find /usr/src -type f -print0 | xargs -0 $(make -V .OBJDIR)/stat > /dev/n= ul)=20 1.23s user 1.81s system 108% cpu 2.810 total conrad@n /u/s/u/stat =E2=9D=AF=E2=9D=AF=E2=9D=AF time (find /usr/src -type = f -print0 | xargs -0 $(make -V .OBJDIR)/stat >/dev/null) ( find /usr/src -type f -print0 | xargs -0 $(make -V .OBJDIR)/stat > /dev/n= ul)=20 1.43s user 1.54s system 107% cpu 2.754 total (I gave both programs a throw-away warm-up run first to make sure the disk caches were comparably primed, etc.) Seems like a clear win. --=20 You are receiving this mail because: You are the assignee for the bug.=