Bug 868086 - Fetching the object metadata involves multiple stat() system calls when one suffices
Summary: Fetching the object metadata involves multiple stat() system calls when one s...
Keywords:
Status: MODIFIED
Alias: None
Product: Gluster-Swift
Classification: Community
Component: object-server
Version: 0.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 903396 978061
TreeView+ depends on / blocked
 
Reported: 2012-10-19 04:01 UTC by Peter Portante
Modified: 2023-01-31 23:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Peter Portante 2012-10-19 04:01:57 UTC
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 04:02:56 UTC
I am currently working on a set of refactorings that should address this issue.

Comment 2 Vijay Bellur 2012-10-25 22:04:51 UTC
CHANGE: http://review.gluster.org/4112 (Reduce the number of stat/fstat system calls made) merged in master by Anand Avati (avati)


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