xattr performance

Christian Kujau
2013-05-17T12:02:21Z

Hi,

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.

Christian.
--
BOFH excuse #43:

boss forgot system password