JAMES-2508 RabbitMQ mnesia datas should be on TMPFS

This brings a little performance inprovment.


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/cb4c42b2
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/cb4c42b2
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/cb4c42b2

Branch: refs/heads/master
Commit: cb4c42b2a2a37369c23b1733c318de99e14269b8
Parents: fc77d02
Author: benwa <btell...@linagora.com>
Authored: Tue Jul 31 11:56:53 2018 +0700
Committer: benwa <btell...@linagora.com>
Committed: Wed Aug 1 18:04:44 2018 +0700

----------------------------------------------------------------------
 .../java/org/apache/james/queue/rabbitmq/DockerRabbitMQ.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/cb4c42b2/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/DockerRabbitMQ.java
----------------------------------------------------------------------
diff --git 
a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/DockerRabbitMQ.java
 
b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/DockerRabbitMQ.java
index 02f89b2..a6aed4c 100644
--- 
a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/DockerRabbitMQ.java
+++ 
b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/DockerRabbitMQ.java
@@ -27,6 +27,7 @@ import org.testcontainers.DockerClientFactory;
 import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.containers.Network;
 
+import com.google.common.collect.ImmutableMap;
 import com.rabbitmq.client.ConnectionFactory;
 
 public class DockerRabbitMQ {
@@ -58,7 +59,9 @@ public class DockerRabbitMQ {
                 .withCreateContainerCmdModifier(cmd -> 
cmd.withHostName(hostName.orElse(DEFAULT_RABBIT_NODE)))
                 .withExposedPorts(DEFAULT_RABBITMQ_PORT)
                 .waitingFor(RabbitMQWaitStrategy.withDefaultTimeout(this))
-                .withLogConsumer(frame -> LOGGER.debug(frame.getUtf8String()));
+                .withLogConsumer(frame -> LOGGER.debug(frame.getUtf8String()))
+                .withCreateContainerCmdModifier(cmd -> cmd.getHostConfig()
+                    .withTmpFs(ImmutableMap.of("/var/lib/rabbitmq/mnesia", 
"rw,noexec,nosuid,size=100m")));
         net.ifPresent(container::withNetwork);
         erlangCookie.ifPresent(cookie -> 
container.withEnv(RABBITMQ_ERLANG_COOKIE, cookie));
         nodeName.ifPresent(name -> container.withEnv(RABBITMQ_NODENAME, name));


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to