You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Nikola Milikic <ni...@gmail.com> on 2012/02/07 23:24:45 UTC

Optimal configuration of MySQL server for Jena SDB

Hi all,

I'm using Jena SDB alongside with
Jenabean<http://code.google.com/p/jenabean/>in a project which
currently doesn't have much triples (around 15K in our
testing base). Backend database is MySQL. For those who haven't worked with
it yet, Jenabean is an ORM like library giving the ability to map ontology
instances to OO classes in Java. Jenabean works directly with Jena's Model
instance, which is in my case managed by SDB.

With this kind of setting, I'm facing big performance issues as some
operations (like loading a resource from the repository) can take as much
as 20, 30 seconds, making quite a big impact on a general usability of the
application.

My question is whether there is a recommended configuration which can be
applied to SDB or MySQL for increasing performance? I know that MySQL
configuration should be made depending on a machine's hardware itself, but
it would be helpful for me if I can get a look at a sample configuration
(for a sample hardware configuration) making SDB to have a
good performance. I've already tried increasing innodb_buffer_pool_size as
suggested on Jena's
website<http://incubator.apache.org/jena/documentation/sdb/db_notes.html#mysql>,
but didn't get a big performance change.

When having H2 database as a backend instead of MySQL, performances are
much, much better, probably because H2 is loading in memory.

I would be extremely grateful for any kind of help!

Best regards,
Nikola

Re: Optimal configuration of MySQL server for Jena SDB

Posted by Andy Seaborne <an...@apache.org>.
I don't how jenabean works but if it is making Model-level API calls, 
then there is a danger of needing many calls to the DB for each operation.

In SDB, that means a network operation over JDBC; for H2, it's an 
in-process JDBC call.

Can you load the data into memory and use SDB as a backing store for the 
model?

It might also be that jenabean needs a cache between it and the store 
(many ORMs do this in one way or another).

Using the in-memory model as the datastructure jenabean operates on is 
achieving that effect.

	Andy

On 07/02/12 22:24, Nikola Milikic wrote:
> Hi all,
>
> I'm using Jena SDB alongside with
> Jenabean<http://code.google.com/p/jenabean/>in a project which
> currently doesn't have much triples (around 15K in our
> testing base). Backend database is MySQL. For those who haven't worked with
> it yet, Jenabean is an ORM like library giving the ability to map ontology
> instances to OO classes in Java. Jenabean works directly with Jena's Model
> instance, which is in my case managed by SDB.
>
> With this kind of setting, I'm facing big performance issues as some
> operations (like loading a resource from the repository) can take as much
> as 20, 30 seconds, making quite a big impact on a general usability of the
> application.
>
> My question is whether there is a recommended configuration which can be
> applied to SDB or MySQL for increasing performance? I know that MySQL
> configuration should be made depending on a machine's hardware itself, but
> it would be helpful for me if I can get a look at a sample configuration
> (for a sample hardware configuration) making SDB to have a
> good performance. I've already tried increasing innodb_buffer_pool_size as
> suggested on Jena's
> website<http://incubator.apache.org/jena/documentation/sdb/db_notes.html#mysql>,
> but didn't get a big performance change.
>
> When having H2 database as a backend instead of MySQL, performances are
> much, much better, probably because H2 is loading in memory.
>
> I would be extremely grateful for any kind of help!
>
> Best regards,
> Nikola
>