Bug 865493 - Metadata storage uses 254 byte key/value xattr pairs
Summary: Metadata storage uses 254 byte key/value xattr pairs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: object-storage
Version: 3.3.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Portante
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-11 15:04 UTC by Peter Portante
Modified: 2014-07-11 16:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-07-11 16:16:48 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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)


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