You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/06/18 23:55:41 UTC
git commit: - add new performance improvements to system configuration
Updated Branches:
refs/heads/develop 54b71f4c4 -> 38b9b31b1
- add new performance improvements to system configuration
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/38b9b31b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/38b9b31b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/38b9b31b
Branch: refs/heads/develop
Commit: 38b9b31b15357fd5900480b2048479ff420849c7
Parents: 54b71f4
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Jun 18 23:55:35 2013 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Jun 18 23:55:35 2013 +0200
----------------------------------------------------------------------
.../apache/marmotta/kiwi/config/KiWiConfiguration.java | 2 +-
.../core/services/triplestore/SesameServiceImpl.java | 2 ++
.../src/main/resources/config-defaults.properties | 12 ++++++++++++
.../src/main/resources/config-descriptions.properties | 13 +++++++++++++
4 files changed, 28 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/38b9b31b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
index a80901a..0dc5b09 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
@@ -72,7 +72,7 @@ public class KiWiConfiguration {
*/
private boolean batchCommit;
- private int batchSize = 1000;
+ private int batchSize = 10000;
/**
* If enabled, and batchCommit is also true, load sequence values into static memory fields once and increment
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/38b9b31b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
index 72dc965..638a83d 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
@@ -153,6 +153,8 @@ public class SesameServiceImpl implements SesameService {
KiWiConfiguration configuration = new KiWiConfiguration("lmf", jdbcUrl, dbUser, dbPass, dialect, configurationService.getDefaultContext(), configurationService.getInferredContext());
configuration.setQueryLoggingEnabled(configurationService.getBooleanConfiguration("database.debug.slowqueries",false));
configuration.setBatchCommit(batchCommit);
+ configuration.setBatchSize(configurationService.getIntConfiguration("database.batchsize",10000));
+ configuration.setMemorySequences(configurationService.getBooleanConfiguration("database.memsequences",true));
store = new KiWiStore(configuration);
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/38b9b31b/platform/marmotta-core/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-defaults.properties b/platform/marmotta-core/src/main/resources/config-defaults.properties
index 4fadcf2..16caabb 100644
--- a/platform/marmotta-core/src/main/resources/config-defaults.properties
+++ b/platform/marmotta-core/src/main/resources/config-defaults.properties
@@ -161,6 +161,18 @@ database.mode =
# report slow queries in the log (not thread safe)
database.debug.slowqueries = false
+
+# turn on batch commits for database transactions (EXPERIMENTAL); if supported by the database backend, this can
+# lead to considerable performance improvements
+database.batchcommit = true
+
+# the maximum size of a batch before it is committed to the database; only applicable if batchcommit is enabled
+database.batchsize = 10000
+
+# turn on in-memory sequences (EXPERIMENTAL); if enabled, sequences are pre-loaded once and then updated in memory
+# and only written back if a transaction commits
+database.memsequences = true
+
# Hibernate-specific configuration for H2
database.h2.driver = org.h2.Driver
database.h2.url = jdbc:h2:/tmp/kiwi/db/kiwi;MVCC=true;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=10
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/38b9b31b/platform/marmotta-core/src/main/resources/config-descriptions.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-descriptions.properties b/platform/marmotta-core/src/main/resources/config-descriptions.properties
index e260dda..f0c80c7 100644
--- a/platform/marmotta-core/src/main/resources/config-descriptions.properties
+++ b/platform/marmotta-core/src/main/resources/config-descriptions.properties
@@ -165,6 +165,19 @@ database.mode.type = java.lang.Enum("create"|"update"|"validate"|"off")
database.debug.slowqueries.description = enable reporting of slow database queries (produces additional overhead and is not thread safe)
database.debug.slowqueries.type = java.lang.Boolean
+database.batchcommit.description = turn on batch commits for database transactions (EXPERIMENTAL); if supported by the \
+ database backend, this can lead to considerable performance improvements
+database.batchcommit.type = java.lang.Boolean
+
+database.batchsize.description = the maximum size of a batch before it is committed to the database; only applicable if \
+ batchcommit is enabled
+database.batchsize.type = java.lang.Integer(10|0|*)
+
+database.memsequences.description = turn on in-memory sequences (EXPERIMENTAL); if enabled, sequences are pre-loaded \
+ once and then updated in memory and only written back if a transaction commits
+database.memsequences.type = java.lang.Boolean
+
+
###############################################################################
# LMF importer configuration
###############################################################################