I've been running GraphDB 6.1.0 with the following benchmark on the OwlimSchemaRepository via the Sesame API:

Perform operation 10x
        Load 10,000 random triples into a graph
        copy triples into a different graph (and delete the original graph) i.e. a MOVE <FROM> <TO>

Iterations happen sequentially one after the other, and at the end of this test the database should only contain 10,000 triples.

Under this test sesame performs each iteration with a mean time of about 7s with hardly any variance in its default configuration (except it is also configured to index graphs).

However graphdb performs far worse with the quickest iteration being 13s (almost twice as slow as sesame), and the slowest being 43s... the average time for an iteration was 25.6s; but with such a wide variation on a small dataset it seems highly unpredictable.

I have also configured the store with the following options to switch off inferencing and anything that might make it slower:

"ruleset" "empty"
"transaction-mode" "fast"
"enable-literal-index" "false"
"repository-type" "file-repository"
"enable-context-index" "false"

Is this expected behaviour? I haven't begun testing query performance yet, but I'm surprised by what I'm seeing. Could you suggest a configuration which might perform better?

Many thanks.

asked 30 Jan '15, 08:57

Rick%20Moynihan's gravatar image

Rick Moynihan
accept rate: 0%

edited 30 Jan '15, 09:03


we were trying to figure out your test. Here is our interpretation where the performance is much bettar than one you have (you can post us your implementation too)

package test;

import java.io.File; import java.util.Random;

import org.openrdf.model.URI; import org.openrdf.model.impl.URIImpl; import org.openrdf.query.QueryLanguage; import org.openrdf.repository.Repository; import org.openrdf.repository.RepositoryConnection; import org.openrdf.repository.sail.SailRepository;

import com.ontotext.trree.OwlimSchemaRepository;

public class Load10kRandomStatements {

static Random r = new Random(0);

public static void main(String[] args) throws Exception { long time = 0; for (int i = 0; i < 10; i++) { time += test(); } System.out.println("avg time = " + (time / 10)); }

public static long test() throws Exception { long start = System.currentTimeMillis(); File storage = new File("storage"); delete(storage); OwlimSchemaRepository sr = new OwlimSchemaRepository(); sr.setParameter("ruleset", "empty"); sr.setParameter("transaction-mode", "fast"); sr.setParameter("enable-literal-index", "false"); sr.setParameter("repository-type", "file-repository"); sr.setParameter("enable-context-index", "false"); sr.setParameter("storage-folder", "owlim-storage"); sr.setDataDir(storage); Repository repo = new SailRepository(sr); repo.initialize(); RepositoryConnection conn = repo.getConnection(); conn.begin(); URI context = newRandomURI(); for (int i = 0; i < 10000; i++) { conn.add(newRandomURI(), newRandomURI(), newRandomURI(), context); } conn.commit(); URI context1 = newRandomURI(); conn.begin(); conn.prepareUpdate(QueryLanguage.SPARQL, "MOVE <" + context + "> TO <" + context1 + ">").execute(); conn.commit(); conn.close(); repo.shutDown(); delete(storage); long time = System.currentTimeMillis() - start; System.out.println("Done in " + time + " ms."); return time; }

public static URI newRandomURI() { return new URIImpl("http://uri" + r.nextLong()); }

public static void delete(File f) { if (f.isDirectory()) { for (File entry: f.listFiles()) { delete(entry); } } f.delete(); } }


answered 02 Feb '15, 10:42

Venelin%20Kotsev's gravatar image

Venelin Kotsev
accept rate: 20%


Unfortunately I can't share the specific test because we are testing a proprietary service, which performs those operations via a restful HTTP api. i.e. it is the performance of our HTTP api we are testing, when initialised with either sesame's native store or GraphDB's store.

The timings I posted are performance differences between initialising with a raw sesame native-store repository or a GraphDB instance.

Have you tried running your test against sesame's native store, as it is the relative performance I am interested in i.e. how much faster/slower is graphdb's performance for the above operations in relation to sesame?

(16 Feb '15, 09:26) Rick Moynihan

Could you retry your test but with context indices enabled in graphDB? From the original description you are working with chunks of data stored within some contexts - without these indices any request that tries to do something with a set of statements in a particular context will end up as "full table scan"-like operation to find which one match it so to do what is expected ...

(18 Feb '15, 11:17) Damyan Ognyanov ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 30 Jan '15, 08:57

Seen: 1,260 times

Last updated: 18 Feb '15, 11:17

powered by BitNami OSQA