Return-Path: X-Original-To: apmail-marmotta-commits-archive@minotaur.apache.org Delivered-To: apmail-marmotta-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 96538C742 for ; Tue, 18 Jun 2013 21:56:07 +0000 (UTC) Received: (qmail 35117 invoked by uid 500); 18 Jun 2013 21:56:07 -0000 Delivered-To: apmail-marmotta-commits-archive@marmotta.apache.org Received: (qmail 35090 invoked by uid 500); 18 Jun 2013 21:56:07 -0000 Mailing-List: contact commits-help@marmotta.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@marmotta.incubator.apache.org Delivered-To: mailing list commits@marmotta.incubator.apache.org Received: (qmail 35083 invoked by uid 99); 18 Jun 2013 21:56:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jun 2013 21:56:07 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 Jun 2013 21:56:04 +0000 Received: (qmail 34564 invoked by uid 99); 18 Jun 2013 21:55:42 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jun 2013 21:55:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C2B938A7924; Tue, 18 Jun 2013 21:55:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sschaffert@apache.org To: commits@marmotta.incubator.apache.org Message-Id: <1587b926004047f0846ffde402f32a35@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: - add new performance improvements to system configuration Date: Tue, 18 Jun 2013 21:55:41 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Tue Jun 18 23:55:35 2013 +0200 Committer: Sebastian Schaffert 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 ###############################################################################