Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2018 02:47:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 230491] stat(1): Improve performance with getpwuid() and getgrgid() caching
Message-ID:  <bug-230491-227-czF2FgzyM3@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-230491-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-230491-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230491

--- Comment #11 from Conrad Meyer <cem@freebsd.org> ---
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230491-227-czF2FgzyM3>