activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: Change on buffer timeout...
Date Tue, 21 Jul 2015 12:55:43 GMT
Change on buffer timeout...

I had done a lot of tests today, and having 100 nanoseconds for the buffer timeout is a better
default for the default installation created through the create command.
I have added some information on when to change as a comment on the xml


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/522c399b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/522c399b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/522c399b

Branch: refs/heads/master
Commit: 522c399bd27621f7caa5b755656e7272e77b85dd
Parents: dcd6033
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Fri Jun 26 13:59:09 2015 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Jul 21 09:42:43 2015 +0100

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/cli/commands/etc/broker.xml    | 6 ++++++
 .../test/java/org/apache/activemq/cli/test/ArtemisTest.java    | 2 +-
 .../core/journal/impl/AbstractSequentialFileFactory.java       | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/522c399b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
index 52d665e..4c5b440 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
@@ -35,6 +35,12 @@ under the License.
 
       <paging-directory>${data.dir}/paging</paging-directory>
 
+      <!-- Nanosecond time for batching timeout before IO operations
+           This will batch multiple writes before IO writes.
+           Increasing this timeout would benefit scalabitility of multiple
+           producers and consumers -->
+      <journal-buffer-timeout>100</journal-buffer-timeout>
+
       <bindings-directory>${data.dir}/bindings</bindings-directory>
 
       <journal-directory>${data.dir}/journal</journal-directory>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/522c399b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
index 99c8f23..e939f68 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
@@ -75,7 +75,7 @@ public class ArtemisTest
       Artemis.main("create", temporaryFolder.getRoot().getAbsolutePath(), "--force", "--silent-input",
"--no-web");
       System.setProperty("artemis.instance", temporaryFolder.getRoot().getAbsolutePath());
       // Some exceptions may happen on the initialization, but they should be ok on start
the basic core protocol
-      Artemis.main("run");
+      Artemis.execute("run");
       Assert.assertEquals(Integer.valueOf(70), Artemis.execute("producer", "--txt-size",
"50", "--message-count", "70", "--verbose"));
       Assert.assertEquals(Integer.valueOf(70), Artemis.execute("consumer", "--txt-size",
"50", "--verbose", "--break-on-null", "--receive-timeout", "100"));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/522c399b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
index ec0ab4d..fcb8586 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
@@ -71,7 +71,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
    {
       this.journalDir = journalDir;
 
-      if (buffered)
+      if (buffered && bufferTimeout > 0)
       {
          timedBuffer = new TimedBuffer(bufferSize, bufferTimeout, logRates);
       }


Mime
View raw message