On 05/17/2013 10:44 AM, Ben Myers wrote:
> Hey Christian,
> On Fri, May 17, 2013 at 05:02:21AM -0700, Christian Kujau wrote:
>> a while ago I was setting & reading extended attributes to ~25000 files 
>> in a directory structure on an XFS filesystem. The files were usually a 
>> few MB in size, but some where up to 2GB in size.
>> Anyway, I *felt* that setting or reading these xattrs was going very
>> slowly. While the storage may be not the fastest, stat()'ing these
>> files was fine, but getfattr/setfattr took very long.
>> I got curious and while it turned out that the slowness was related to the 
>> wrapper script I used to read/set those values, I created a little test 
>> suite to 1) create a few thousand files and 2) do xattr operations on 
>> them and see if xattr performance was filesystem specific:
>>    http://nerdbynature.de/bits/xattr/
>> Not very sophisticated, true. But it was interesting to see that 
>> ext3/ext4/xfs behaved kinda well for all these tests; btrfs/jfs/reiserfs
>> sometimes took way longer than the others.
> Very interesting results!  One wrinkle that you might want to consider with 
> is the overall size of the attributes versus the size of the inode.  You can
> choose inode sizes between 256 bytes and 2k in powers of two, and we always
> allocate them in chunks of 64.  The 'literal' area is the space after the 
> inode
> core and before the next one... it's best described here:
> http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/On-disk_Inode.html

The jfs inode is fixed at 512 bytes and space for inline xattr data is
limited to 128 bytes. Anything that won't fit here will require
allocating one or more data blocks to store the xattr.


Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
Jfs-discussion mailing list

Reply via email to