You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Matthew Holt <ma...@mpholt.com> on 2018/07/30 17:13:04 UTC

Poor performance, replacing TDB or upgrading from 2.7.1?

Hi all,
We have a mature product that began using Jena TDB in 2008 when our product
was created. It uses it as the intermediary layer, and at a lower-level,
all data is persisted to a relational database as well.

As the scale of data used by our application has grown, TDB has
increasingly served as the largest bottleneck currently. Long-running
queries consistently hang the server, lock contention, and customers often
have to rebuild the indices. This normally starts happening more with
indices of 70gb/170 million triples. Additionally, customers have to have
large amounts of RAM, even with Mapped IO enabled.

I don't doubt some of this is due to the way data has been stored in the
database, etc. I'm relatively new to the product. Colleagues with more
experience have said TDB is ultimately not a good use case for our product,
and the best way is to migrate to a relational database and use that
instead.

As this is an extremely large effort, I did notice that we're using TDB
2.7.1. I know this is a wide-open question,  but would you expect
significant performance/etc improvement by migrating to either TDB 3.8 or
TDB2?


Thank you,
Matt

Re: Poor performance, replacing TDB or upgrading from 2.7.1?

Posted by Andy Seaborne <an...@apache.org>.
On 31/07/18 02:45, Matthew Holt wrote:
> Hi Adam,
> It's a concurrent web-application, often having hundreds of users accessing
> it at once (especially in performance testing scenarios). Very similar to
> if Microsoft Project was implemented as a concurrent web-application. Lots
> of concurrent reads and writes. Writes slowing things down a bit, so we
> recommend to users to use solid state machines where possible. Lock
> contention has definitely been an issue over time.
> 
> A large issue is having to require enough RAM to keep the entire indices in
> memory, with users often having 120 gbs of memory. Mapped IO has been
> enabled recently on non-Windows VM's, which has helped there somewhat.

The database seems to be quite large for the number of triples, or you 
have very large literals.  BSBM 200m is about 39G total size for example.

TDB doesn't reclaim all space and every so often its a good idea to 
reset the database (backup.restore) every so often.

TDB 0.9.1 (Jena 2.7.1) was a long time ago (2012) - a lot has changed 
since including bug fixes.

And, yes, SSDs are better especially at start-up.

     Andy




> 
> On Mon, Jul 30, 2018 at 8:33 PM, <aj...@apache.org> wrote:
> 
>> Ok, next question; what your workload like? Lots of reads, lots of updates,
>> what kind of mix? Is there high concurrency and if so, if what character?
>>
>> Adam
>>
>> On Mon, Jul 30, 2018, 7:06 PM Matthew Holt <ma...@mpholt.com> wrote:
>>
>>> Hi,
>>> Thanks for your e-mail. We're using a jena-core directly.
>>>
>>> We haven't implemented or used Fuseki though....
>>>
>>> Thank you,
>>> Matt
>>>
>>> On Mon, Jul 30, 2018 at 2:39 PM, ajs6f <aj...@apache.org> wrote:
>>>
>>>> How is TDB being deployed here? Are you using Fuseki or connecting more
>>>> directly?
>>>>
>>>> ajs6f
>>>>
>>>>> On Jul 30, 2018, at 1:13 PM, Matthew Holt <ma...@mpholt.com>
>> wrote:
>>>>>
>>>>> Hi all,
>>>>> We have a mature product that began using Jena TDB in 2008 when our
>>>> product
>>>>> was created. It uses it as the intermediary layer, and at a
>>> lower-level,
>>>>> all data is persisted to a relational database as well.
>>>>>
>>>>> As the scale of data used by our application has grown, TDB has
>>>>> increasingly served as the largest bottleneck currently. Long-running
>>>>> queries consistently hang the server, lock contention, and customers
>>>> often
>>>>> have to rebuild the indices. This normally starts happening more with
>>>>> indices of 70gb/170 million triples. Additionally, customers have to
>>> have
>>>>> large amounts of RAM, even with Mapped IO enabled.
>>>>>
>>>>> I don't doubt some of this is due to the way data has been stored in
>>> the
>>>>> database, etc. I'm relatively new to the product. Colleagues with
>> more
>>>>> experience have said TDB is ultimately not a good use case for our
>>>> product,
>>>>> and the best way is to migrate to a relational database and use that
>>>>> instead.
>>>>>
>>>>> As this is an extremely large effort, I did notice that we're using
>> TDB
>>>>> 2.7.1. I know this is a wide-open question,  but would you expect
>>>>> significant performance/etc improvement by migrating to either TDB
>> 3.8
>>> or
>>>>> TDB2?
>>>>>
>>>>>
>>>>> Thank you,
>>>>> Matt
>>>>
>>>>
>>>
>>
> 

Re: Poor performance, replacing TDB or upgrading from 2.7.1?

Posted by Matthew Holt <ma...@mpholt.com>.
Hi Adam,
It's a concurrent web-application, often having hundreds of users accessing
it at once (especially in performance testing scenarios). Very similar to
if Microsoft Project was implemented as a concurrent web-application. Lots
of concurrent reads and writes. Writes slowing things down a bit, so we
recommend to users to use solid state machines where possible. Lock
contention has definitely been an issue over time.

A large issue is having to require enough RAM to keep the entire indices in
memory, with users often having 120 gbs of memory. Mapped IO has been
enabled recently on non-Windows VM's, which has helped there somewhat.

On Mon, Jul 30, 2018 at 8:33 PM, <aj...@apache.org> wrote:

> Ok, next question; what your workload like? Lots of reads, lots of updates,
> what kind of mix? Is there high concurrency and if so, if what character?
>
> Adam
>
> On Mon, Jul 30, 2018, 7:06 PM Matthew Holt <ma...@mpholt.com> wrote:
>
> > Hi,
> > Thanks for your e-mail. We're using a jena-core directly.
> >
> > We haven't implemented or used Fuseki though....
> >
> > Thank you,
> > Matt
> >
> > On Mon, Jul 30, 2018 at 2:39 PM, ajs6f <aj...@apache.org> wrote:
> >
> > > How is TDB being deployed here? Are you using Fuseki or connecting more
> > > directly?
> > >
> > > ajs6f
> > >
> > > > On Jul 30, 2018, at 1:13 PM, Matthew Holt <ma...@mpholt.com>
> wrote:
> > > >
> > > > Hi all,
> > > > We have a mature product that began using Jena TDB in 2008 when our
> > > product
> > > > was created. It uses it as the intermediary layer, and at a
> > lower-level,
> > > > all data is persisted to a relational database as well.
> > > >
> > > > As the scale of data used by our application has grown, TDB has
> > > > increasingly served as the largest bottleneck currently. Long-running
> > > > queries consistently hang the server, lock contention, and customers
> > > often
> > > > have to rebuild the indices. This normally starts happening more with
> > > > indices of 70gb/170 million triples. Additionally, customers have to
> > have
> > > > large amounts of RAM, even with Mapped IO enabled.
> > > >
> > > > I don't doubt some of this is due to the way data has been stored in
> > the
> > > > database, etc. I'm relatively new to the product. Colleagues with
> more
> > > > experience have said TDB is ultimately not a good use case for our
> > > product,
> > > > and the best way is to migrate to a relational database and use that
> > > > instead.
> > > >
> > > > As this is an extremely large effort, I did notice that we're using
> TDB
> > > > 2.7.1. I know this is a wide-open question,  but would you expect
> > > > significant performance/etc improvement by migrating to either TDB
> 3.8
> > or
> > > > TDB2?
> > > >
> > > >
> > > > Thank you,
> > > > Matt
> > >
> > >
> >
>

Re: Poor performance, replacing TDB or upgrading from 2.7.1?

Posted by aj...@apache.org.
Ok, next question; what your workload like? Lots of reads, lots of updates,
what kind of mix? Is there high concurrency and if so, if what character?

Adam

On Mon, Jul 30, 2018, 7:06 PM Matthew Holt <ma...@mpholt.com> wrote:

> Hi,
> Thanks for your e-mail. We're using a jena-core directly.
>
> We haven't implemented or used Fuseki though....
>
> Thank you,
> Matt
>
> On Mon, Jul 30, 2018 at 2:39 PM, ajs6f <aj...@apache.org> wrote:
>
> > How is TDB being deployed here? Are you using Fuseki or connecting more
> > directly?
> >
> > ajs6f
> >
> > > On Jul 30, 2018, at 1:13 PM, Matthew Holt <ma...@mpholt.com> wrote:
> > >
> > > Hi all,
> > > We have a mature product that began using Jena TDB in 2008 when our
> > product
> > > was created. It uses it as the intermediary layer, and at a
> lower-level,
> > > all data is persisted to a relational database as well.
> > >
> > > As the scale of data used by our application has grown, TDB has
> > > increasingly served as the largest bottleneck currently. Long-running
> > > queries consistently hang the server, lock contention, and customers
> > often
> > > have to rebuild the indices. This normally starts happening more with
> > > indices of 70gb/170 million triples. Additionally, customers have to
> have
> > > large amounts of RAM, even with Mapped IO enabled.
> > >
> > > I don't doubt some of this is due to the way data has been stored in
> the
> > > database, etc. I'm relatively new to the product. Colleagues with more
> > > experience have said TDB is ultimately not a good use case for our
> > product,
> > > and the best way is to migrate to a relational database and use that
> > > instead.
> > >
> > > As this is an extremely large effort, I did notice that we're using TDB
> > > 2.7.1. I know this is a wide-open question,  but would you expect
> > > significant performance/etc improvement by migrating to either TDB 3.8
> or
> > > TDB2?
> > >
> > >
> > > Thank you,
> > > Matt
> >
> >
>

Re: Poor performance, replacing TDB or upgrading from 2.7.1?

Posted by Matthew Holt <ma...@mpholt.com>.
Hi,
Thanks for your e-mail. We're using a jena-core directly.

We haven't implemented or used Fuseki though....

Thank you,
Matt

On Mon, Jul 30, 2018 at 2:39 PM, ajs6f <aj...@apache.org> wrote:

> How is TDB being deployed here? Are you using Fuseki or connecting more
> directly?
>
> ajs6f
>
> > On Jul 30, 2018, at 1:13 PM, Matthew Holt <ma...@mpholt.com> wrote:
> >
> > Hi all,
> > We have a mature product that began using Jena TDB in 2008 when our
> product
> > was created. It uses it as the intermediary layer, and at a lower-level,
> > all data is persisted to a relational database as well.
> >
> > As the scale of data used by our application has grown, TDB has
> > increasingly served as the largest bottleneck currently. Long-running
> > queries consistently hang the server, lock contention, and customers
> often
> > have to rebuild the indices. This normally starts happening more with
> > indices of 70gb/170 million triples. Additionally, customers have to have
> > large amounts of RAM, even with Mapped IO enabled.
> >
> > I don't doubt some of this is due to the way data has been stored in the
> > database, etc. I'm relatively new to the product. Colleagues with more
> > experience have said TDB is ultimately not a good use case for our
> product,
> > and the best way is to migrate to a relational database and use that
> > instead.
> >
> > As this is an extremely large effort, I did notice that we're using TDB
> > 2.7.1. I know this is a wide-open question,  but would you expect
> > significant performance/etc improvement by migrating to either TDB 3.8 or
> > TDB2?
> >
> >
> > Thank you,
> > Matt
>
>

Re: Poor performance, replacing TDB or upgrading from 2.7.1?

Posted by ajs6f <aj...@apache.org>.
How is TDB being deployed here? Are you using Fuseki or connecting more directly?

ajs6f

> On Jul 30, 2018, at 1:13 PM, Matthew Holt <ma...@mpholt.com> wrote:
> 
> Hi all,
> We have a mature product that began using Jena TDB in 2008 when our product
> was created. It uses it as the intermediary layer, and at a lower-level,
> all data is persisted to a relational database as well.
> 
> As the scale of data used by our application has grown, TDB has
> increasingly served as the largest bottleneck currently. Long-running
> queries consistently hang the server, lock contention, and customers often
> have to rebuild the indices. This normally starts happening more with
> indices of 70gb/170 million triples. Additionally, customers have to have
> large amounts of RAM, even with Mapped IO enabled.
> 
> I don't doubt some of this is due to the way data has been stored in the
> database, etc. I'm relatively new to the product. Colleagues with more
> experience have said TDB is ultimately not a good use case for our product,
> and the best way is to migrate to a relational database and use that
> instead.
> 
> As this is an extremely large effort, I did notice that we're using TDB
> 2.7.1. I know this is a wide-open question,  but would you expect
> significant performance/etc improvement by migrating to either TDB 3.8 or
> TDB2?
> 
> 
> Thank you,
> Matt