You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2017/04/27 11:42:47 UTC
qpid-broker-j git commit: QPID-7639: [Java Broker] [Documentation]
Add documentation about restricting memory usage by uncommitted transactions
on a connection
Repository: qpid-broker-j
Updated Branches:
refs/heads/master b2f341655 -> 3eba6a022
QPID-7639: [Java Broker] [Documentation] Add documentation about restricting memory usage by uncommitted transactions on a connection
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/3eba6a02
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/3eba6a02
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/3eba6a02
Branch: refs/heads/master
Commit: 3eba6a0222605b641fab39ae1676af60e7178d69
Parents: b2f3416
Author: Alex Rudyy <or...@apache.org>
Authored: Thu Apr 27 12:39:18 2017 +0100
Committer: Alex Rudyy <or...@apache.org>
Committed: Thu Apr 27 12:42:14 2017 +0100
----------------------------------------------------------------------
.../org/apache/qpid/server/model/Connection.java | 6 +++++-
.../docbkx/runtime/Java-Broker-Runtime-Memory.xml | 15 ++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/3eba6a02/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java b/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
index 5e0031e..a0b96b8 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
@@ -47,7 +47,11 @@ public interface Connection<X extends Connection<X>> extends ConfiguredObject<X>
String MAX_UNCOMMITTED_IN_MEMORY_SIZE = "connection.maxUncommittedInMemorySize";
- @ManagedContextDefault(name = MAX_UNCOMMITTED_IN_MEMORY_SIZE)
+ @ManagedContextDefault(name = MAX_UNCOMMITTED_IN_MEMORY_SIZE,
+ description = "Defines the maximum limit of total messages sizes (in bytes) from uncommitted transactions"
+ + " which connection can hold in memory. If limit is breached, all messages from"
+ + " connection in-flight transactions are flown to disk including those arriving"
+ + " after breaching the limit.")
long DEFAULT_MAX_UNCOMMITTED_IN_MEMORY_SIZE = 10l * 1024l * 1024l;
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/3eba6a02/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
----------------------------------------------------------------------
diff --git a/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml b/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
index 8babeb8..148262b 100644
--- a/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
+++ b/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
@@ -99,11 +99,18 @@
</para>
<para>
When the broker is <link linkend="Java-Broker-Runtime-Memory-Low-Memory-Direct">running low on direct memory</link>
- it will evict messages from memory and <link linkend="Java-Broker-Runtime-Flow-To-Disk">flow them to disk</link>.
+ it will evict enqueued messages from memory and <link linkend="Java-Broker-Runtime-Flow-To-Disk">flow them to disk</link>.
For persistent messages this only means freeing the direct memory representation because they always have an on-disk representation to guard against unexpected failure (e.g., a power cut).
For transient messages this implies additional disk I/O.
After being flown to disk messages need to be re-read from disk before delivery.
</para>
+ <para>Please, note that messages from uncommitted transactions are not
+ <link linkend="Java-Broker-Runtime-Flow-To-Disk">flown to disk</link> as part of
+ <link linkend="Java-Broker-Runtime-Memory-Low-Memory-Direct">running into low direct memory conditions</link>,
+ as they are not enqueued yet. The <literal>Connection</literal> has its own threshold for
+ keeping messages from uncommitted transactions in memory. Only when <literal>Connection</literal> threshold
+ is breached, the uncommitted messages on the connection are
+ <link linkend="Java-Broker-Runtime-Flow-To-Disk">flown to disk</link>.</para>
</section>
<section xml:id="Java-Broker-Runtime-Memory-Usage-BDB">
<title>Message Store</title>
@@ -201,6 +208,12 @@
Should the broker use more than direct memory it will flow incoming messages to disk.
Should utilisation fall beneath the threshold it will stop flowing messages to disk.
</listitem>
+ <listitem>
+ The system property <literal>connection.maxUncommittedInMemorySize</literal> sets the threshold (in bytes)
+ for total messages sizes (in bytes) from connection uncommitted transactions when messages are hold in memory.
+ If threshold is exceeded, all messages from connection in-flight transactions are flown to disk including
+ those arriving after breaching the threshold.
+ </listitem>
</itemizedlist>
</section>
<section>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org