public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tridge@samba.org
To: linux-kernel@vger.kernel.org
Subject: performance of filesystem xattrs with Samba4
Date: Fri, 19 Nov 2004 18:38:40 +1100	[thread overview]
Message-ID: <16797.41728.984065.479474@samba.org> (raw)
In-Reply-To: <1098383538.987.359.camel@new.localdomain>

I've been developing the posix backend for Samba4 over the last few
months. It has now reached the stage where it is passing most of the
test suites, so its time to start some performance testing.

The biggest change from the kernels point of view is that Samba4 makes
extensive use of filesystem xattrs. Almost every file with have a
user.DosAttrib xattr containing file attributes and additional
timestamp fields. A lot of files will also have a system.NTACL
attribute containing a NT ACL, and many files will have a
user.DosStreams xattr for NT alternate data streams. Some rare files
will have a user.DosEAs xattr for DOS extended attribute
support. Files with streams will also have separate xattrs for each NT
stream.

I started some simple benchmarking today using the BENCH-NBENCH
smbtorture benchmark, with 10 simulated clients and loopback
networking on a dual Xeon server with 2G ram and a 50G scsi partition.
I used a 2.6.10-rc2 kernel. This benchmark only involves a
user.DosAttrib xattr of size 44 on every file (that will be the most
common situation in production use).

ext2                68 MB/sec
ext2+xattr          64 MB/sec

ext3                67 MB/sec
ext3+xattr          58 MB/sec

xfs                 62 MB/sec
xfs+xattr           40 MB/sec
xfs+2Kinode         63 MB/sec
xfs+xattr+2Kinode   58 MB/sec

tmpfs               69 MB/sec
tmpfs+xattr         ?? MB/sec (failed)

jfs                 36 MB/sec
jfs+xattr           29 MB/sec

reiser              58 MB/sec
reiser+xattr        44 MB/sec

To get the ext2/ext3 results I needed to add "return NULL;" at the
start of ext3_xattr_cache_find() to avoid a bug in the xattr sharing
code that causes a oops (I've reported the oops separately).

The tmpfs+xattr failure above is because tmpfs didn't seem to allow
user xattrs, despite having CONFIG_TMPFS_XATTR=y.

I'm very impressed that ext3 has improved so much since I last did
Samba benchmarks. It used to always be the slowest in my tests, but
now it is the fastest journaled filesystem for Samba4. almost matching
tmpfs. 

The XFS results with default options are rather disappointing, as XFS
has usually been a good performer for Samba workloads. Increasing the
inode size to 2k brought it back to a more reasonable level.

The high cost of xattr support is a bit of a problem. In the above,
xattrs were enabled in the filesystems for all runs, the difference
being whether I told Samba4 to use them or not. I hope we can reduce
the cost of xattrs as otherwise Samba4 is going to be seriously
disadvantaged when full windows compatibility is needed. I'm guessing
that nearly all Samba installs will be using xattrs by this time next
year, as we can't do basic security features like WinXP security zones
without them, so making them perform well will be important.

To make it easier to benchmark with xattrs, I'm planning on doing a
new version of dbench with optional xattr support. That will allow
others to play with xattr performance for the above workload without
having to delve into the esoteric world of Samba4 development.

Apart from the 2k inode with XFS I haven't tried any filesystem tuning
options. I'll probably wait till I have xattr support in dbench for
that, to make large numbers of runs with different options easier.

If anyone wants to see in detail what we are sticking in these xattrs,
then look at
  http://samba.org/ftp/unpacked/samba4/source/librpc/idl/xattr.idl 
for an IDL specification of the xattr format we are using.

Soon we'll be starting to integrate the xattr support with a LSM
module, to allow the kernel to interpret the NT ACLs directly to avoid
races, make things a little more efficient (using a xattr cache
holding unpacked ACLs), and allowing for the possibility of non-Samba
file access to obey the NT ACLs.

Cheers, Tridge

  parent reply	other threads:[~2004-11-19  7:40 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <16759.16648.459393.752417@samba.org>
2004-10-21 18:32 ` [PATCH] Re: idr in Samba4 Jim Houston
2004-10-22  6:17   ` tridge
2004-11-19  7:38   ` tridge [this message]
2004-11-19  8:08     ` performance of filesystem xattrs with Samba4 James Morris
2004-11-19 10:16     ` Andreas Dilger
2004-11-19 11:43       ` tridge
2004-11-19 22:28         ` Andreas Dilger
2004-11-22 13:02       ` tridge
2004-11-22 21:40         ` Andreas Dilger
2004-11-19 12:03     ` Anton Altaparmakov
2004-11-19 12:43       ` tridge
2004-11-19 14:11         ` Anton Altaparmakov
2004-11-20 10:44           ` tridge
2004-11-20 16:20             ` Hans Reiser
2004-11-20 23:29               ` tridge
2004-11-19 15:34     ` Hans Reiser
2004-11-19 15:58       ` Jan Engelhardt
2004-11-19 22:03       ` tridge
2004-11-20  4:51         ` Hans Reiser
2004-11-19 23:01       ` tridge
2004-11-20  0:26         ` Andrew Morton
2004-11-21  1:14           ` tridge
2004-11-21  2:12           ` tridge
2004-11-21 23:53           ` tridge
2004-11-23  9:37           ` tridge
2004-11-23 17:55             ` Andreas Dilger
2004-11-24  7:53           ` tridge
2004-11-20  4:40         ` Hans Reiser
2004-11-20  6:47           ` tridge
2004-11-20 16:13             ` Hans Reiser
2004-11-20 23:16               ` tridge
2004-11-21  2:36                 ` Hans Reiser
2004-11-21  0:21               ` tridge
2004-11-21  2:41                 ` Hans Reiser
2004-11-21  1:53               ` tridge
2004-11-21  2:48                 ` Hans Reiser
2004-11-21  3:19                   ` tridge
2004-11-21  6:11                     ` Hans Reiser
2004-11-21 22:21     ` Nathan Scott
2004-11-21 23:43       ` tridge
2004-12-03 17:49 Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16797.41728.984065.479474@samba.org \
    --to=tridge@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox