Bug 865493

Summary: Metadata storage uses 254 byte key/value xattr pairs
Product: [Community] GlusterFS Reporter: Peter Portante <pportant>
Component: object-storageAssignee: Peter Portante <pportant>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: gluster-bugs, perfbz, pportant
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-11 16:16:48 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:

Description Peter Portante 2012-10-11 15:04:54 UTC
Description of problem:

  The Gluster-Swift "plugin" reads and writes extended attributes in 254 byte
  chunks. Th

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

  RHS - 3.3.0 (Swift 1.4.8 based)

How reproducible:

  Every time.

Steps to Reproduce:

  1. Instrument the do_setxattr/do_getxattr calls to log invocation
  2. Create a swift container
  3. Count the number of do_setxattr/do_getxattr calls
  
Actual results:

  More than 2

Expected results:

  Two (2):
    * The first to read any existing values
      * Container might already exist, created outside of Swift
    * The second to update with expected values

Additional info:

The case we list above is only one example. There are others.

Part of the reason for the number of xattr calls is because the code arbitrarily limits the number of bytes per key-value pair to 254. In tests, I have been able to write a full 64K (65,536) of data, with a maximum key length of 255 bytes.

Upping the limit for the xattr key/value sizes should alleviate many of the writes.

Additionally, the pyxattr module we rely on offers a get_all() method for retrieving multiple keys in one shot, avoiding the need to repeatedly call get for values greater than 64KB.

Comment 1 Vijay Bellur 2012-10-25 22:02:51 UTC
CHANGE: http://review.gluster.org/4108 (object-storage: Bump size of metadata stored per xattr key) merged in master by Anand Avati (avati)