Bug 763977 (GLUSTER-2245)

Summary: cached stat is slower
Product: [Community] GlusterFS Reporter: Lakshmipathi G <lakshmipathi>
Component: nfsAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.1.1CC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: nfs
Documentation: DNR CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
creat function
none
stat none

Description Lakshmipathi G 2010-12-21 04:46:17 EST
Created attachment 401 [details]
echo where | gdb XF86_S3 core
Comment 1 Lakshmipathi G 2010-12-21 07:45:52 EST
created a dht  setup with 2 server and nfs mounted on client.
created 1,00,000 empty files and ran attached program,first with dropcaches and 
second time without dropcache. second time the program takes long time to complete than the first.
Comment 2 Shehjar Tikoo 2010-12-21 22:46:27 EST
Interesting bug report but its not a bug,its a feature.
The 100k file stats perform poorly as compared to 90k files stating because the nfs server's default inode table size is 90k. Once the cold cache stating for 100k files is over, the inode table contains the most recently accessed 90k files, i.e. from file number 10000 to files number 100000.

When the warm cache run  starts, it starts stating from file 1. Because the inode for this is not in the itable, the first 10k files need to be resolved using the expensive fh resolution method, causing the performance drop.

The performance figures were as expected when the tests were run with 90k and less files.