[Openstack] [Swift] XFS extended attribute performance
Shrinand Javadekar
shrinand at maginatics.com
Tue Mar 24 21:52:04 UTC 2015
Hi,
I wrote a small microbenchmark for measuring the performance of
extended attributes in XFS. In the experiment, I wrote 100K files,
each with extended attributes. In one experiment, XFS was formatted
with the default inode size of 256 bytes. In the other experiment, it
was formatted with an inode size of 2048 bytes.
Here's the actual code: http://pastie.org/private/2gnr3j9p5lxzzufdypkyzq
I ran this using cProfile. The results suggest that time required for
"xattr._xattr.fsetxattr" when the inode is 256 bytes is ~4 times that
when the inode is 2048 bytes.
When the inode is 256 bytes:
ncalls tottime percall cumtime percall filename:lineno(function)
100000 3.933 0.000 3.933 0.000 {xattr._xattr.fsetxattr}
100000 4.344 0.000 4.344 0.000 {xattr._xattr.fsetxattr}
100000 4.624 0.000 4.624 0.000 {xattr._xattr.fsetxattr}
When the inode is 2048 bytes:
ncalls tottime percall cumtime percall filename:lineno(function)
100000 1.239 0.000 1.239 0.000 {xattr._xattr.fsetxattr}
100000 1.102 0.000 1.102 0.000 {xattr._xattr.fsetxattr}
100000 1.067 0.000 1.067 0.000 {xattr._xattr.fsetxattr}
I will delve into more elaborate experiments with Swift and XFS
filesystems formatted with different inode sizes. However, before
that, I wanted to check if the above values are plausible and/or get
suggestions around this microbenchmark.
If these values make sense, will this translate into improved Swift performance?
Thanks in advance.
-Shri
More information about the Openstack
mailing list