Bug 1180130

Summary: Files creates are very slow in directories already having files in it.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Raghavendra Talur <rtalur>
Component: sambaAssignee: Raghavendra Talur <rtalur>
Status: CLOSED ERRATA QA Contact: surabhi <sbhaloth>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: amainkar, divya, nlevinki, psriniva, rcyriac, rtalur, sbhaloth, surs, vagarwal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 2.1.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: samba-3.6.9-167.10.1.el6rhs Doc Type: Bug Fix
Doc Text:
Previously, creating a new file over the SMB protocol, took a long time if the parent directory had many files in it. This was due to a bug in an optimization made to help SMB to ignore case comparison of requested file name with every entry in the directory. With this fix, the time taken to create a new file over the SMB protocol takes lesser time, even if the parent directory has many files in it.
Story Points: ---
Clone Of: 1175088 Environment:
Last Closed: 2015-01-28 10:44:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1086681, 1176659, 1322735    

Comment 2 Raghavendra Talur 2015-01-08 17:49:16 UTC
Patch posted at https://code.engineering.redhat.com/gerrit/#/c/39561/

Comment 3 surabhi 2015-01-13 13:07:40 UTC
Creating a new file on samba share where already 120000 files existed, time taken is as follows:

2.1U5
*************

PS X:\> Measure-command {type NUL > X:\file120005.txt}

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 12
Milliseconds      : 186
Ticks             : 121864982
TotalDays         : 0.00014104743287037
TotalHours        : 0.00338513838888889
TotalMinutes      : 0.203108303333333
TotalSeconds      : 12.1864982
TotalMilliseconds : 12186.4982

***************************************************************

2.1U6:
*******************

PS X:\> Measure-command {type NUL > X:\file120006.txt}

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 2
Milliseconds      : 409
Ticks             : 24097314
TotalDays         : 2.78904097222222E-05
TotalHours        : 0.000669369833333333
TotalMinutes      : 0.04016219
TotalSeconds      : 2.4097314
TotalMilliseconds : 2409.7314


*******************************************************************
On windows client (2.1U6)the performance improvement is 6 times better than 2.1 U5.

On Linux cifs client the results are as follows : with case sensitive=yes for the share:
*******************************************************************

2.1 U6:
# time touch file120003

real	0m1.049s
user	0m0.000s
sys	0m0.002s

2.1U5:
*****
# time touch cifsfile120002

real	0m1.454s
user	0m0.000s
sys	0m0.004s

************************************************************************
Performance is improved by 6x from U5 to U6 for create.
Moving the BZ to verified.

Comment 5 Raghavendra Talur 2015-01-20 09:21:25 UTC
The doc text looks good to me.

Credit is not mine, the doc text had been through edit once for 3.0 bug.

Comment 7 errata-xmlrpc 2015-01-28 10:44:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0095.html