Bug 865493 - Metadata storage uses 254 byte key/value xattr pairs
Metadata storage uses 254 byte key/value xattr pairs
Product: GlusterFS
Classification: Community
Component: object-storage (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Peter Portante
Depends On:
  Show dependency treegraph
Reported: 2012-10-11 11:04 EDT by Peter Portante
Modified: 2014-07-11 12:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-07-11 12:16:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Portante 2012-10-11 11:04:54 EDT
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 18:02:51 EDT
CHANGE: http://review.gluster.org/4108 (object-storage: Bump size of metadata stored per xattr key) 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.