smbd: Tune "dir" a bit.
commit565d1409c7c424fbbeed1e98b042d3970b0acf73
authorVolker Lendecke <vl@samba.org>
Thu, 21 Mar 2013 21:00:06 +0000 (21 22:00 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sun, 7 Apr 2013 19:46:52 +0000 (7 21:46 +0200)
treedc97dbca8b0bbb62fd862b3b9c962db516d5b0b9
parent01192ce939cf77737de8efe7072dded5c3e1da94
smbd: Tune "dir" a bit.

for i in $(seq 1 20000) ; do echo dir ; done | smbclient //127.0.0.1/tmp -U%

without and with this patch:

$ time bin/smbd -d0 -i
smbd version 4.1.0pre1-GIT-1f139ae started.
Copyright Andrew Tridgell and the Samba Team 1992-2013
Beendet

real    0m28.342s
user    0m10.249s
sys     0m10.513s

$ time bin/smbd -d0 -i
smbd version 4.1.0pre1-GIT-1f139ae started.
Copyright Andrew Tridgell and the Samba Team 1992-2013
Beendet

real    0m27.348s
user    0m9.089s
sys     0m10.853s

The "real" timestamp is irrelevant, this also contains the time between
starting smbd and the smbclient job. It's the "user" time. The result that this
patch improves the time spent in user space by 10% is consistent.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Fix bug #9736 - Change to smbd/dir.c code gives significant performance
increases on large directory listings.
source3/smbd/dir.c