Red Hat Bugzilla – Bug 865493
Metadata storage uses 254 byte key/value xattr pairs
Last modified: 2014-07-11 12:16:48 EDT
Description of problem:
The Gluster-Swift "plugin" reads and writes extended attributes in 254 byte
Version-Release number of selected component (if applicable):
RHS - 3.3.0 (Swift 1.4.8 based)
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
More than 2
* The first to read any existing values
* Container might already exist, created outside of Swift
* The second to update with expected values
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.
CHANGE: http://review.gluster.org/4108 (object-storage: Bump size of metadata stored per xattr key) merged in master by Anand Avati (firstname.lastname@example.org)