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.
CHANGE: http://review.gluster.org/4108 (object-storage: Bump size of metadata stored per xattr key) merged in master by Anand Avati (avati)