Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jul 2020 16:35:54 +0300
From:      Nick Kostirya <nikolay.kostirya@i11.co>
To:        freebsd-stable@freebsd.org
Subject:   Re: BerkeleyDB Hash vs Btree on FreeBSD and Linux
Message-ID:  <20200703163554.68a87960@i11.co>
In-Reply-To: <CAKBkRUxXJJA6K5t7_op0iAZGrurtoZq23%2BsV4DywjVrnCdueMw@mail.gmail.com>
References:  <20200701130649.0b0643d5@i11.co> <CAKBkRUwnc9aC00NasdMX=g8n1jhiXvfPDwjKaz2sYbB4Hspk5g@mail.gmail.com> <20200701150654.74775e56@i11.co> <CAKBkRUxXJJA6K5t7_op0iAZGrurtoZq23%2BsV4DywjVrnCdueMw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The question is being removed.

I found out that the big difference is only for the HDD, but not for the SSD.
And the difference is very noticeable on long values (> 5000).

But I still did not find the conditions when the hash is better.

I will use only btree from now.



On Thu, 2 Jul 2020 00:00:42 +0800
Li-Wen Hsu <lwhsu@freebsd.org> wrote:

> On Wed, Jul 1, 2020 at 8:07 PM Nick Kostirya via freebsd-stable
> <freebsd-stable@freebsd.org> wrote:
> >
> > On Wed, 1 Jul 2020 18:20:19 +0800
> > Li-Wen Hsu <lwhsu@freebsd.org> wrote:
> >  
> > > On Wed, Jul 1, 2020 at 6:07 PM Nick Kostirya via freebsd-stable
> > > <freebsd-stable@freebsd.org> wrote:  
> > > >
> > > > Hello.
> > > >
> > > > I noticed that BerkeleyDB Hash is VERY slow compared to BerkeleyDB Btree on FreeBSD (UFS or ZFS).
> > > > But they (Hash and Btree) have roughly the same performance on Linux.
> > > >
> > > > Why?  
> > >
> > > It's not an easy question, do you have more information about the test
> > > environment setup, and the statistics of the results?  
> 
> Any information about this?
> 
> > > I'd recommend using some analysis tools like DTrace to check what it's busy for.  
> >
> >
> > The top show getblk status often.
> >
> > Please tell me what you can and how to look with DTrace.
> >
> > I use
> >   dtrace -n '::: /execname == "a.out"/ { @[probefunc] = count(); }'
> >
> > but I do not see the difference between Hash and Btree.  
> 
> I would say check the flame graph:
> http://www.brendangregg.com/blog/2015-03-10/freebsd-flame-graphs.html
> There is benchmarks/flamegraph port but I haven't used it for a while.
> 
> Li-Wen
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200703163554.68a87960>