1

Clearing a named graph with many triples through rdf4j with clear(context) function is slow. Even, manually deleting a named graph through the graphdb interface http://localhost:7200/graphs is slow. I tried to play with the JVM memory according to those guidelines. My server has 64GB RAM, and I am calling graphdb with 40GB JVM memory, the 'graphdb.page.cache.size' is being set to default value '17.8G' :

./graphdb -Xnx40g

but there is no improvement in time when clearing a named graph. It takes approximately 40sec.

Any advice?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
zoe vas
  • 281
  • 9
  • 25
  • Does this answer your question? [Most efficient way to clear a named graph?](https://stackoverflow.com/questions/50280986/most-efficient-way-to-clear-a-named-graph) – Stanislav Kralin Sep 21 '20 at 14:33
  • I think the TO is already using `clear graph` or `drop graph` but it's just slow? – UninformedUser Sep 21 '20 at 15:37
  • 1
    Unfortunately https://stackoverflow.com/questions/50280986/most-efficient-way-to-clear-a-named-graph did not help. I tried clear, delete and drop, but performance did not get improved. – zoe vas Sep 21 '20 at 18:54
  • 1
    Is the context index enabled on your repository? See http://graphdb.ontotext.com/documentation/enterprise/storage.html – Jeen Broekstra Sep 22 '20 at 04:28
  • I see a 'context index' option in the setting of repository. I checked it, but I do not see any improvement in performance. – zoe vas Sep 22 '20 at 08:11
  • 1
    I read here http://graphdb.ontotext.com/documentation/free/delete-optimisations.html that delete of triples takes time, because inferred statements are also checked. But I do not know what I should do for accelerate the delete operation's time. – zoe vas Sep 22 '20 at 08:13
  • 1. Is the context index enabled? If not, it has to check every quad in the repo. 2. Ensure your ontologies are inserted as part of "systemTransaction". 3. Do you use some reasoning you don't really need? https://graphdb.ontotext.com/documentation/standard/rules-optimisations.html#hints-on-optimizing-graphdb-s-rulesets – Vladimir Alexiev Feb 12 '21 at 10:10

0 Answers0