summaryrefslogtreecommitdiff
path: root/qpid/doc/book/src/java-broker/Java-Broker-Runtime-Flow-To-Disk.xml
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/doc/book/src/java-broker/Java-Broker-Runtime-Flow-To-Disk.xml')
-rw-r--r--qpid/doc/book/src/java-broker/Java-Broker-Runtime-Flow-To-Disk.xml42
1 files changed, 42 insertions, 0 deletions
diff --git a/qpid/doc/book/src/java-broker/Java-Broker-Runtime-Flow-To-Disk.xml b/qpid/doc/book/src/java-broker/Java-Broker-Runtime-Flow-To-Disk.xml
new file mode 100644
index 0000000000..f2dbb162e1
--- /dev/null
+++ b/qpid/doc/book/src/java-broker/Java-Broker-Runtime-Flow-To-Disk.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<section id="Java-Broker-Runtime-Flow-To-Disk">
+ <title>Flow to Disk</title>
+ <para>Flow to disk limits the amount of heap memory that can be occupied by messages. Once this
+ limit is reached any new transient messages and all existing transient messages will be
+ transferred to disk. Newly arriving transient messages will continue to go to the disk until the
+ cumulative size of all messages falls below the limit once again.</para>
+ <para>By default the Broker makes 40% of the max available memory for messages. This memory is
+ divided between all the queues across all virtual hosts defined on the Broker with a percentage
+ calculated according to their current queue size.</para>
+ <para>For example if there are two queues, one containing 75MB and the second 100MB messages
+ respectively and the Broker has 1GB heap memory with the default of 40% available for messages.
+ The first queue will have a target size of 170MB and the second 230MB. Once 400MB is taken by
+ messages, messages will begin to flow to disk. New messages will cease to flow to disk when
+ their cumulative size falls beneath 400MB.</para>
+ <para>Target queue sizes are refreshed periodically according to the housekeeping cycle.</para>
+ <para>Flow to disk is configured by Broker context variable
+ <literal>broker.flowToDiskThreshold</literal>. It is expressed as a size in bytes and defaults
+ to 40% of the JVM maximum heap size.</para>
+ <para>TODO: implement log message when flow to disk activates/deactives</para>
+</section>