Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2017 19:04:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-standards@FreeBSD.org
Subject:   [Bug 218622] libc/gen/telldir [hack-n-PATCH] performance limited to O(n) vs file count, O(n^2) against samba ls workload
Message-ID:  <bug-218622-15-xdcMiem58z@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-218622-15@https.bugs.freebsd.org/bugzilla/>
References:  <bug-218622-15@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=3D218622

--- Comment #5 from commit-hook@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 sear=
ch
  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

--=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-218622-15-xdcMiem58z>