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
This commit is contained in:
Clebert Suconic 2015-06-26 13:59:09 -04:00
parent dcd6033e02
commit 522c399bd2
3 changed files with 8 additions and 2 deletions

View File

@ -35,6 +35,12 @@ under the License.
<paging-directory>${data.dir}/paging</paging-directory> <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> <bindings-directory>${data.dir}/bindings</bindings-directory>
<journal-directory>${data.dir}/journal</journal-directory> <journal-directory>${data.dir}/journal</journal-directory>

View File

@ -75,7 +75,7 @@ public class ArtemisTest
Artemis.main("create", temporaryFolder.getRoot().getAbsolutePath(), "--force", "--silent-input", "--no-web"); Artemis.main("create", temporaryFolder.getRoot().getAbsolutePath(), "--force", "--silent-input", "--no-web");
System.setProperty("artemis.instance", temporaryFolder.getRoot().getAbsolutePath()); 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 // 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("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")); Assert.assertEquals(Integer.valueOf(70), Artemis.execute("consumer", "--txt-size", "50", "--verbose", "--break-on-null", "--receive-timeout", "100"));

View File

@ -71,7 +71,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
{ {
this.journalDir = journalDir; this.journalDir = journalDir;
if (buffered) if (buffered && bufferTimeout > 0)
{ {
timedBuffer = new TimedBuffer(bufferSize, bufferTimeout, logRates); timedBuffer = new TimedBuffer(bufferSize, bufferTimeout, logRates);
} }