[Bug 218622] libc/gen/telldir [hack-n-PATCH] performance limited to O(n) vs file count, O(n^2) against samba ls workload
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Apr 17 19:04:04 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218622
--- Comment #5 from commit-hook at freebsd.org ---
A commit references this bug:
Author: mav
Date: Mon Apr 17 19:03:31 UTC 2017
New revision: 317064
URL: https://svnweb.freebsd.org/changeset/base/317064
Log:
Optimize pathologic case of telldir() for Samba.
When application reads large directory, calling telldir() for each entry,
like Samba does, it creates exponential performance drop as number of
entries reach tenths to hundreds of thousands. It is caused by full search
through the internal list, that never finds matches in that scenario, but
creates O(n^2) delays. This patch optimizes that search, limiting it to
entries of the same buffer, turning time closer to O(n) in case of linear
directory scan.
PR: 218622
Reviewed by: jhb, jilles
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D10408
Changes:
head/lib/libc/gen/telldir.c
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-standards
mailing list