Bug 868086 - Fetching the object metadata involves multiple stat() system calls when one suffices
Fetching the object metadata involves multiple stat() system calls when one s...
Status: MODIFIED
Product: Gluster-Swift
Classification: Community
Component: object-server (Show other bugs)
0.1
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Peter Portante
:
Depends On:
Blocks: 903396 978061
  Show dependency treegraph
 
Reported: 2012-10-19 00:01 EDT by Peter Portante
Modified: 2016-02-17 19:12 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Peter Portante 2012-10-19 00:01:57 EDT
Description of problem:

  Generating, or regenerating, metadata for an object (not a container or
  account) involves multiple stat system calls when one will suffice.

Version-Release number of selected component (if applicable):

  RHS 2.0

How reproducible:

  Every time.

Steps to Reproduce:
1. strace object-server process
2. PUT a new object
3. GET that object
4. Observe stat system calls made in strace output

Actual results:

  Multiple stat system calls made.

Expected results:

  One system call made on behalf of the GET operation.

Additional info:

  See http://pastebin.test.redhat.com/110818 from lines 226 through 243,
  you'll notice the following stat() and fstat() calls made to the file
  being fetched ("testfile.txt"):
    * Line 226, stat()
    * Line 235, stat()
    * Line 237, fstat() of same file open'd on fd 15
    * Line 238, stat()
    * Line 243, fstat() of same file open'd on fd 15

  These 5 calls can most likely be reduced to at most one.
Comment 1 Peter Portante 2012-10-19 00:02:56 EDT
I am currently working on a set of refactorings that should address this issue.
Comment 2 Vijay Bellur 2012-10-25 18:04:51 EDT
CHANGE: http://review.gluster.org/4112 (Reduce the number of stat/fstat system calls made) merged in master by Anand Avati (avati@redhat.com)

Note You need to log in before you can comment on or make changes to this bug.