samba 3.0.0 and spinlocks ?
Jens Osterkamp
Jens.Osterkamp at de.ibm.com
Tue Nov 25 09:52:53 GMT 2003
Hello everybody,
recently i've been doing some performance testing with samba 3.0.0 and
smbtorture on Linux on zSeries.
I found out that a lot of kernel time was spent in posix_lock_file,
obviously doing file locking for the internal
data structures kept in /var/lib/samba/*tdb.
So I tried to replace the posix file locking by using the spinlock code
(./configure --with-spinlocks).
When running smbd with my changes, I observe a 15-20% increase in
smbtorture throughput and
some weird error messages, that I haven't been able to resolve :
Nov 18 10:21:37 pserver16 smbd[2968]: [2003/11/18 10:21:37, 0]
tdb/tdbutil.c:tdb_log(724)
Nov 18 10:21:37 pserver16 smbd[2968]: tdb(/var/lib/samba/locking.tdb):
tdb_oob len -2320 beyond eof at
40960
Nov 18 10:21:37 pserver16 smbd[2968]: [2003/11/18 10:21:37, 0]
tdb/tdbutil.c:tdb_log(724)
Nov 18 10:21:37 pserver16 smbd[2968]: tdb(/var/lib/samba/locking.tdb):
tdb_free: left read failed at 4
294964952 (4096)
Disabling spinlocks gets rid of the problem.
Has anybody seen anything like this before ?
Normally I would say, something with my patch is going wrong, but I have
seen exactly the same error
messages on an Intel machine without my patches, with spinlock code
enabled.
The problems appear in the samba-3.0.0.tar.bz2 from samba.org as well as
with the SuSE samba3-3.0.0.src.rpm.
Is it safe and reasonable to use spinlocks ? Has this part of the code been
thoroughly tested ?
Any help/hint/tip is highly appreciated.
Thanks,
Jens
More information about the samba-technical
mailing list