[PATCH] lib: Fix gencache_del
Volker Lendecke
Volker.Lendecke at SerNet.DE
Sun Mar 6 17:28:17 UTC 2016
On Sun, Mar 06, 2016 at 04:57:01PM +0100, Ralph Boehme wrote:
> On Fri, Mar 04, 2016 at 01:18:47PM +0100, Volker Lendecke wrote:
> > On Fri, Mar 04, 2016 at 08:15:51AM +0100, Volker Lendecke wrote:
> > > On Thu, Mar 03, 2016 at 07:08:18PM +0100, Michael Adam wrote:
> > > > Unfortunately, this fails make test due to a slight
> > > > change in semantics of delete:
> > >
> > > Attached find a patchset that survived a private autobuild for me.
> > >
> > > Comments welcome!
> >
> > Not a good day for me today. Working on the next version of this
> > patchset.
>
> maybe we should get rid of the double (or tripple with memcache) cache
> layering and use lmdb for the gencache.
>
> I did a quick prototype with gencache on top of your dbwrap_lmdb
> patches and ran some random artificial torture based benchmarks.
Be aware that dbwrap_lmdb is far from finished. It might be
possible to use it when my dbwrap_nolock lands. lmdb does
not not have per-record locking, which we right now need. If
we get rid of fetch_locked keeping os-level locks, things
might change.
Also, Howard has included the patches to work with large
lmdbs even for 32-bit architectures, lmdb can be compiled in
a mode that does not always have to map in the complete db.
> tdb:
>
> $ sudo ./bin/smbtorture3 //localhost/normal -Uralph%... LOCAL-GENCACHE
> using seed 1457257817
> host=localhost share=normal user=ralph myname=sernet
> Running LOCAL-GENCACHE
> ../source3/torture/torture.c:8248: loop took 14396469 us
> LOCAL-GENCACHE took 14.5311 secs
>
> lmdb:
>
> $ sudo ./bin/smbtorture3 //localhost/normal -Uralph%... LOCAL-GENCACHE
> using seed 1457257675
> host=localhost share=normal user=ralph myname=sernet
> Running LOCAL-GENCACHE
> Opening /opt/samba/var/cache/gencache.tdb with lmdb
> ../source3/torture/torture.c:8248: loop took 5890560 us
> LOCAL-GENCACHE took 6.10858 secs
>
> This is on top of master, not on top of your patchset, I'll do that
> next. I'd expect times will be much closer then as it gets rid of the
> memcache and the fcntl locking.
I'll be very interested to see that one! Please make sure
you've actually got mutexes activated, but that's kindof
obvious for you :-)
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list