[PATCH] lib: Fix gencache_del

Ralph Boehme rb at sernet.de
Sun Mar 6 17:29:12 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.
> 
> 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.

much better with your latest patchset:

$ sudo ./bin/smbtorture3 //localhost/normal -Uralph%... LOCAL-GENCACHE
using seed 1457285012
host=localhost share=normal user=ralph myname=sernet
Running LOCAL-GENCACHE
../source3/torture/torture.c:8246: loop took 7793368 us
LOCAL-GENCACHE took 8.21564 secs

Flamegraph:
<https://www.samba.org/~slow/files/gencache-tdb-improved.svg>

-Ralph

-- 
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@sernet.de



More information about the samba-technical mailing list