You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/12/12 16:11:21 UTC

svn commit: r1002655 [33/47] - in /websites/production/activemq/content/artemis/docs/1.5.1: ./ diagrams/ gitbook/ gitbook/fonts/ gitbook/fonts/fontawesome/ gitbook/gitbook-plugin-fontsettings/ gitbook/gitbook-plugin-highlight/ gitbook/gitbook-plugin-lu...

Added: websites/production/activemq/content/artemis/docs/1.5.1/paging.html
==============================================================================
--- websites/production/activemq/content/artemis/docs/1.5.1/paging.html (added)
+++ websites/production/activemq/content/artemis/docs/1.5.1/paging.html Mon Dec 12 16:11:17 2016
@@ -0,0 +1,1163 @@
+
+<!DOCTYPE HTML>
+<html lang="" >
+    <head>
+        <title>Paging · ActiveMQ Artemis Documentation</title>
+        <meta charset="UTF-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+        <meta name="description" content="">
+        <meta name="generator" content="GitBook 3.1.1">
+        
+        
+        
+    
+    <link rel="stylesheet" href="gitbook/style.css">
+
+    
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
+                
+            
+        
+
+    
+
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+
+        
+    
+    
+    <meta name="HandheldFriendly" content="true"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
+    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
+
+    
+    <link rel="next" href="queue-attributes.html" />
+    
+    
+    <link rel="prev" href="large-messages.html" />
+    
+
+    </head>
+    <body>
+        
+<div class="book">
+    <div class="book-summary">
+        
+            
+<div id="book-search-input" role="search">
+    <input type="text" placeholder="Type to search" />
+</div>
+
+            
+                <nav role="navigation">
+                
+
+
+<ul class="summary">
+    
+    
+
+    
+
+    
+        
+        
+    
+        <li class="chapter " data-level="1.1" data-path="./">
+            
+                <a href="./">
+            
+                    
+                    Introduction
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.2" data-path="notice.html">
+            
+                <a href="notice.html">
+            
+                    
+                    Legal Notice
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.3" data-path="preface.html">
+            
+                <a href="preface.html">
+            
+                    
+                    Preface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.4" data-path="project-info.html">
+            
+                <a href="project-info.html">
+            
+                    
+                    Project Info
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.5" data-path="messaging-concepts.html">
+            
+                <a href="messaging-concepts.html">
+            
+                    
+                    Messaging Concepts
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.6" data-path="architecture.html">
+            
+                <a href="architecture.html">
+            
+                    
+                    Architecture
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.7" data-path="using-server.html">
+            
+                <a href="using-server.html">
+            
+                    
+                    Using the Server
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.8" data-path="using-jms.html">
+            
+                <a href="using-jms.html">
+            
+                    
+                    Using JMS
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.9" data-path="using-core.html">
+            
+                <a href="using-core.html">
+            
+                    
+                    Using Core
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.10" data-path="jms-core-mapping.html">
+            
+                <a href="jms-core-mapping.html">
+            
+                    
+                    Mapping JMS Concepts to the Core API
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.11" data-path="client-classpath.html">
+            
+                <a href="client-classpath.html">
+            
+                    
+                    The Client Classpath
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.12" data-path="examples.html">
+            
+                <a href="examples.html">
+            
+                    
+                    Examples
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.13" data-path="wildcard-routing.html">
+            
+                <a href="wildcard-routing.html">
+            
+                    
+                    Routing Messages With Wild Cards
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.14" data-path="wildcard-syntax.html">
+            
+                <a href="wildcard-syntax.html">
+            
+                    
+                    Understanding the Apache ActiveMQ Artemis Wildcard Syntax
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.15" data-path="filter-expressions.html">
+            
+                <a href="filter-expressions.html">
+            
+                    
+                    Filter Expressions
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.16" data-path="persistence.html">
+            
+                <a href="persistence.html">
+            
+                    
+                    Persistence
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.17" data-path="configuring-transports.html">
+            
+                <a href="configuring-transports.html">
+            
+                    
+                    Configuring Transports
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.18" data-path="config-reload.html">
+            
+                <a href="config-reload.html">
+            
+                    
+                    Configuration Reload
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.19" data-path="connection-ttl.html">
+            
+                <a href="connection-ttl.html">
+            
+                    
+                    Detecting Dead Connections
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.20" data-path="slow-consumers.html">
+            
+                <a href="slow-consumers.html">
+            
+                    
+                    Detecting Slow Consumers
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.21" data-path="network-isolation.html">
+            
+                <a href="network-isolation.html">
+            
+                    
+                    Avoiding Network Isolation
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.22" data-path="transaction-config.html">
+            
+                <a href="transaction-config.html">
+            
+                    
+                    Resource Manager Configuration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.23" data-path="flow-control.html">
+            
+                <a href="flow-control.html">
+            
+                    
+                    Flow Control
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.24" data-path="send-guarantees.html">
+            
+                <a href="send-guarantees.html">
+            
+                    
+                    Guarantees of sends and commits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.25" data-path="undelivered-messages.html">
+            
+                <a href="undelivered-messages.html">
+            
+                    
+                    Message Redelivery and Undelivered Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.26" data-path="message-expiry.html">
+            
+                <a href="message-expiry.html">
+            
+                    
+                    Message Expiry
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.27" data-path="large-messages.html">
+            
+                <a href="large-messages.html">
+            
+                    
+                    Large Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter active" data-level="1.28" data-path="paging.html">
+            
+                <a href="paging.html">
+            
+                    
+                    Paging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.29" data-path="queue-attributes.html">
+            
+                <a href="queue-attributes.html">
+            
+                    
+                    Queue Attributes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.30" data-path="scheduled-messages.html">
+            
+                <a href="scheduled-messages.html">
+            
+                    
+                    Scheduled Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.31" data-path="last-value-queues.html">
+            
+                <a href="last-value-queues.html">
+            
+                    
+                    Last-Value Queues
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.32" data-path="message-grouping.html">
+            
+                <a href="message-grouping.html">
+            
+                    
+                    Message Grouping
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.33" data-path="pre-acknowledge.html">
+            
+                <a href="pre-acknowledge.html">
+            
+                    
+                    Extra Acknowledge Modes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.34" data-path="management.html">
+            
+                <a href="management.html">
+            
+                    
+                    Management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.35" data-path="security.html">
+            
+                <a href="security.html">
+            
+                    
+                    Security
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.36" data-path="resource-limits.html">
+            
+                <a href="resource-limits.html">
+            
+                    
+                    Resource Limits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.37" data-path="jms-bridge.html">
+            
+                <a href="jms-bridge.html">
+            
+                    
+                    The JMS Bridge
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.38" data-path="client-reconnection.html">
+            
+                <a href="client-reconnection.html">
+            
+                    
+                    Client Reconnection and Session Reattachment
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.39" data-path="diverts.html">
+            
+                <a href="diverts.html">
+            
+                    
+                    Diverting and Splitting Message Flows
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.40" data-path="core-bridges.html">
+            
+                <a href="core-bridges.html">
+            
+                    
+                    Core Bridges
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.41" data-path="duplicate-detection.html">
+            
+                <a href="duplicate-detection.html">
+            
+                    
+                    Duplicate Message Detection
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.42" data-path="clusters.html">
+            
+                <a href="clusters.html">
+            
+                    
+                    Clusters
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.43" data-path="ha.html">
+            
+                <a href="ha.html">
+            
+                    
+                    High Availability and Failover
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.44" data-path="graceful-shutdown.html">
+            
+                <a href="graceful-shutdown.html">
+            
+                    
+                    Graceful Server Shutdown
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.45" data-path="libaio.html">
+            
+                <a href="libaio.html">
+            
+                    
+                    Libaio Native Libraries
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.46" data-path="thread-pooling.html">
+            
+                <a href="thread-pooling.html">
+            
+                    
+                    Thread management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.47" data-path="logging.html">
+            
+                <a href="logging.html">
+            
+                    
+                    Logging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.48" data-path="rest.html">
+            
+                <a href="rest.html">
+            
+                    
+                    REST Interface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.49" data-path="embedding-activemq.html">
+            
+                <a href="embedding-activemq.html">
+            
+                    
+                    Embedding Apache ActiveMQ Artemis
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.50" data-path="karaf.html">
+            
+                <a href="karaf.html">
+            
+                    
+                    Apache Karaf
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.51" data-path="spring-integration.html">
+            
+                <a href="spring-integration.html">
+            
+                    
+                    Spring Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.52" data-path="aerogear-integration.html">
+            
+                <a href="aerogear-integration.html">
+            
+                    
+                    AeroGear Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.53" data-path="vertx-integration.html">
+            
+                <a href="vertx-integration.html">
+            
+                    
+                    VertX Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.54" data-path="cdi-integration.html">
+            
+                <a href="cdi-integration.html">
+            
+                    
+                    CDI Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.55" data-path="intercepting-operations.html">
+            
+                <a href="intercepting-operations.html">
+            
+                    
+                    Intercepting Operations
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.56" data-path="protocols-interoperability.html">
+            
+                <a href="protocols-interoperability.html">
+            
+                    
+                    Protocols and Interoperability
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.57" data-path="tools.html">
+            
+                <a href="tools.html">
+            
+                    
+                    Tools
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.58" data-path="maven-plugin.html">
+            
+                <a href="maven-plugin.html">
+            
+                    
+                    Maven Plugin
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.59" data-path="unit-testing.html">
+            
+                <a href="unit-testing.html">
+            
+                    
+                    Unit Testing
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.60" data-path="perf-tuning.html">
+            
+                <a href="perf-tuning.html">
+            
+                    
+                    Troubleshooting and Performance Tuning
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.61" data-path="configuration-index.html">
+            
+                <a href="configuration-index.html">
+            
+                    
+                    Configuration Reference
+            
+                </a>
+            
+
+            
+        </li>
+    
+
+    
+
+    <li class="divider"></li>
+
+    <li>
+        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
+            Published with GitBook
+        </a>
+    </li>
+</ul>
+
+
+                </nav>
+            
+        
+    </div>
+
+    <div class="book-body">
+        
+            <div class="body-inner">
+                
+                    
+
+<div class="book-header" role="navigation">
+    
+
+    <!-- Title -->
+    <h1>
+        <i class="fa fa-circle-o-notch fa-spin"></i>
+        <a href="." >Paging</a>
+    </h1>
+</div>
+
+
+
+
+                    <div class="page-wrapper" tabindex="-1" role="main">
+                        <div class="page-inner">
+                            
+<div id="book-search-results">
+    <div class="search-noresults">
+    
+                                <section class="normal markdown-section">
+                                
+                                <h1 id="paging">Paging</h1>
+<p>Apache ActiveMQ Artemis transparently supports huge queues containing millions of
+messages while the server is running with limited memory.</p>
+<p>In such a situation it&apos;s not possible to store all of the queues in
+memory at any one time, so Apache ActiveMQ Artemis transparently <em>pages</em> messages into
+and out of memory as they are needed, thus allowing massive queues with
+a low memory footprint.</p>
+<p>Apache ActiveMQ Artemis will start paging messages to disk, when the size of all
+messages in memory for an address exceeds a configured maximum size.</p>
+<p>The default configuration from Artemis has destinations with paging.</p>
+<h2 id="page-files">Page Files</h2>
+<p>Messages are stored per address on the file system. Each address has an
+individual folder where messages are stored in multiple files (page
+files). Each file will contain messages up to a max configured size
+(<code>page-size-bytes</code>). The system will navigate on the files as needed,
+and it will remove the page file as soon as all the messages are
+acknowledged up to that point.</p>
+<p>Browsers will read through the page-cursor system.</p>
+<p>Consumers with selectors will also navigate through the page-files and it will ignore messages that don&apos;t match the criteria.</p>
+<blockquote>
+<p><em>Warning:</em>
+When you have a queue, and consumers filtering the queue with a very restrictive selector you may get into a situation where you won&apos;t be able to read more data from paging until you consume messages from the queue.</p>
+<p>Example: in one consumer you make a selector as &apos;color=&quot;red&quot;&apos;
+but you only have one color red 1 millions messages after blue, you won&apos;t be able to consume red until you consume blue ones.</p>
+<p>This is different to browsing as we will &quot;browse&quot; the entire queue looking for messages and while we &quot;depage&quot; messages while feeding the queue.</p>
+</blockquote>
+<h2 id="configuration">Configuration</h2>
+<p>You can configure the location of the paging folder</p>
+<p>Global paging parameters are specified on the main configuration file
+(<code>broker.xml</code>).</p>
+<pre><code>&lt;configuration xmlns=&quot;urn:activemq&quot;
+   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+   xsi:schemaLocation=&quot;urn:activemq /schema/artemis-server.xsd&quot;&gt;
+...
+&lt;paging-directory&gt;/somewhere/paging-directory&lt;/paging-directory&gt;
+...
+</code></pre><p>  Property Name        Description                                                                                                                 Default</p>
+<hr>
+<p>  <code>paging-directory</code>   Where page files are stored. Apache ActiveMQ Artemis will create one folder for each address being paged under this configured location.   data/paging</p>
+<p>  : Paging Configuration Parameters</p>
+<h2 id="paging-mode">Paging Mode</h2>
+<p>As soon as messages delivered to an address exceed the configured size,
+that address alone goes into page mode.</p>
+<blockquote>
+<p><strong>Note</strong></p>
+<p>Paging is done individually per address. If you configure a
+max-size-bytes for an address, that means each matching address will
+have a maximum size that you specified. It DOES NOT mean that the
+total overall size of all matching addresses is limited to
+max-size-bytes.</p>
+</blockquote>
+<h2 id="configuration">Configuration</h2>
+<p>Configuration is done at the address settings, done at the main
+configuration file (<code>broker.xml</code>).</p>
+<pre><code>&lt;address-settings&gt;
+   &lt;address-setting match=&quot;jms.someaddress&quot;&gt;
+      &lt;max-size-bytes&gt;104857600&lt;/max-size-bytes&gt;
+      &lt;page-size-bytes&gt;10485760&lt;/page-size-bytes&gt;
+      &lt;address-full-policy&gt;PAGE&lt;/address-full-policy&gt;
+   &lt;/address-setting&gt;
+&lt;/address-settings&gt;
+</code></pre><p>This is the list of available parameters on the address settings.</p>
+<table summary="Server Configuration" border="1">
+    <colgroup>
+        <col>
+        <col>
+        <col>
+    </colgroup>
+    <thead>
+    <tr>
+        <th>Property Name</th>
+        <th>Description</th>
+        <th>Default</th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr>
+        <td>`max-size-bytes`</td>
+        <td>What&apos;s the max memory the address could have before entering on page mode.</td>
+        <td>-1 (disabled)</td>
+    </tr>
+    <tr>
+        <td>`page-size-bytes`</td>
+        <td>The size of each page file used on the paging system</td>
+        <td>10MiB (10 \* 1024 \* 1024 bytes)</td>
+    </tr>
+    <tr>
+        <td>`address-full-policy`</td>
+        <td>This must be set to PAGE for paging to enable. If the value is PAGE then further messages will be paged to disk. If the value is DROP then further messages will be silently dropped. If the value is FAIL then the messages will be dropped and the client message producers will receive an exception. If the value is BLOCK then client message producers will block when they try and send further messages.</td>
+        <td>PAGE</td>
+    </tr>
+    <tr>
+        <td>`page-max-cache-size`</td>
+        <td>The system will keep up to `page-max-cache-size` page files in memory to optimize IO during paging navigation.</td>
+        <td>5</td>
+    </tr>
+    </tbody>
+</table>
+
+<h2 id="global-max-size">Global Max Size</h2>
+<p>Beyond the max-size-bytes on the address you can also set the global-max-size on the main configuration. If you set max-size-bytes = -1 on paging the global-max-size can still be used.</p>
+<p>When you have more messages than what is configured global-max-size any new produced message will make that destination to go through its paging policy. </p>
+<h2 id="dropping-messages">Dropping messages</h2>
+<p>Instead of paging messages when the max size is reached, an address can
+also be configured to just drop messages when the address is full.</p>
+<p>To do this just set the <code>address-full-policy</code> to <code>DROP</code> in the address
+settings</p>
+<h2 id="dropping-messages-and-throwing-an-exception-to-producers">Dropping messages and throwing an exception to producers</h2>
+<p>Instead of paging messages when the max size is reached, an address can
+also be configured to drop messages and also throw an exception on the
+client-side when the address is full.</p>
+<p>To do this just set the <code>address-full-policy</code> to <code>FAIL</code> in the address
+settings</p>
+<h2 id="blocking-producers">Blocking producers</h2>
+<p>Instead of paging messages when the max size is reached, an address can
+also be configured to block producers from sending further messages when
+the address is full, thus preventing the memory being exhausted on the
+server.</p>
+<p>When memory is freed up on the server, producers will automatically
+unblock and be able to continue sending.</p>
+<p>To do this just set the <code>address-full-policy</code> to <code>BLOCK</code> in the address
+settings</p>
+<p>In the default configuration, all addresses are configured to block
+producers after 10 MiB of data are in the address.</p>
+<h2 id="caution-with-addresses-with-multiple-queues">Caution with Addresses with Multiple Queues</h2>
+<p>When a message is routed to an address that has multiple queues bound to
+it, e.g. a JMS subscription in a Topic, there is only 1 copy of the
+message in memory. Each queue only deals with a reference to this.
+Because of this the memory is only freed up once all queues referencing
+the message have delivered it.</p>
+<p>If you have a single lazy subscription, the entire address will suffer
+IO performance hit as all the queues will have messages being sent
+through an extra storage on the paging system.</p>
+<p>For example:</p>
+<ul>
+<li><p>An address has 10 queues</p>
+</li>
+<li><p>One of the queues does not deliver its messages (maybe because of a
+slow consumer).</p>
+</li>
+<li><p>Messages continually arrive at the address and paging is started.</p>
+</li>
+<li><p>The other 9 queues are empty even though messages have been sent.</p>
+</li>
+</ul>
+<p>In this example all the other 9 queues will be consuming messages from
+the page system. This may cause performance issues if this is an
+undesirable state.</p>
+<h2 id="max-disk-usage">Max Disk Usage</h2>
+<p>The System will perform scans on the disk to determine if the disk is beyond a configured limit. 
+These are configured through &apos;max-disk-usage&apos; in percentage. Once that limit is reached any 
+message will be blocked. (unless the protocol doesn&apos;t support flow control on which case there will be an exception thrown and the connection for those clients dropped).</p>
+<h2 id="example">Example</h2>
+<p>See the <a href="examples.html">examples</a> chapter for an example which shows how to use paging with Apache ActiveMQ Artemis.</p>
+
+                                
+                                </section>
+                            
+    </div>
+    <div class="search-results">
+        <div class="has-results">
+            
+            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
+            <ul class="search-results-list"></ul>
+            
+        </div>
+        <div class="no-results">
+            
+            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
+            
+        </div>
+    </div>
+</div>
+
+                        </div>
+                    </div>
+                
+            </div>
+
+            
+                
+                <a href="large-messages.html" class="navigation navigation-prev " aria-label="Previous page: Large Messages">
+                    <i class="fa fa-angle-left"></i>
+                </a>
+                
+                
+                <a href="queue-attributes.html" class="navigation navigation-next " aria-label="Next page: Queue Attributes">
+                    <i class="fa fa-angle-right"></i>
+                </a>
+                
+            
+        
+    </div>
+
+    <script>
+        var gitbook = gitbook || [];
+        gitbook.push(function() {
+            gitbook.page.hasChanged({"page":{"title":"Paging","level":"1.28","depth":1,"next":{"title":"Queue Attributes","level":"1.29","depth":1,"path":"queue-attributes.md","ref":"queue-attributes.md","articles":[]},"previous":{"title":"Large Messages","level":"1.27","depth":1,"path":"large-messages.md","ref":"large-messages.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/e
 book.css","print":"styles/print.css"},"showLevel":false}},"github":"apache/activemq-artemis","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"ActiveMQ Artemis Documentation","links":{"home":"http://activemq.apache.org/","issues":"http://activemq.apache.org/","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis User Guide and Reference Documentation"},"file":{"path":"paging.md","mtime":"2016-12-07T20:53:24.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2016-12-12T15:50:38.065Z"},"basePath":".","book":{"language":""}});
+        });
+    </script>
+</div>
+
+        
+    <script src="gitbook/gitbook.js"></script>
+    <script src="gitbook/theme.js"></script>
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
+        
+    
+
+    </body>
+</html>
+

Added: websites/production/activemq/content/artemis/docs/1.5.1/perf-tuning.html
==============================================================================
--- websites/production/activemq/content/artemis/docs/1.5.1/perf-tuning.html (added)
+++ websites/production/activemq/content/artemis/docs/1.5.1/perf-tuning.html Mon Dec 12 16:11:17 2016
@@ -0,0 +1,1273 @@
+
+<!DOCTYPE HTML>
+<html lang="" >
+    <head>
+        <title>Troubleshooting and Performance Tuning · ActiveMQ Artemis Documentation</title>
+        <meta charset="UTF-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+        <meta name="description" content="">
+        <meta name="generator" content="GitBook 3.1.1">
+        
+        
+        
+    
+    <link rel="stylesheet" href="gitbook/style.css">
+
+    
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
+                
+            
+        
+
+    
+
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+
+        
+    
+    
+    <meta name="HandheldFriendly" content="true"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
+    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
+
+    
+    <link rel="next" href="configuration-index.html" />
+    
+    
+    <link rel="prev" href="unit-testing.html" />
+    
+
+    </head>
+    <body>
+        
+<div class="book">
+    <div class="book-summary">
+        
+            
+<div id="book-search-input" role="search">
+    <input type="text" placeholder="Type to search" />
+</div>
+
+            
+                <nav role="navigation">
+                
+
+
+<ul class="summary">
+    
+    
+
+    
+
+    
+        
+        
+    
+        <li class="chapter " data-level="1.1" data-path="./">
+            
+                <a href="./">
+            
+                    
+                    Introduction
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.2" data-path="notice.html">
+            
+                <a href="notice.html">
+            
+                    
+                    Legal Notice
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.3" data-path="preface.html">
+            
+                <a href="preface.html">
+            
+                    
+                    Preface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.4" data-path="project-info.html">
+            
+                <a href="project-info.html">
+            
+                    
+                    Project Info
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.5" data-path="messaging-concepts.html">
+            
+                <a href="messaging-concepts.html">
+            
+                    
+                    Messaging Concepts
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.6" data-path="architecture.html">
+            
+                <a href="architecture.html">
+            
+                    
+                    Architecture
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.7" data-path="using-server.html">
+            
+                <a href="using-server.html">
+            
+                    
+                    Using the Server
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.8" data-path="using-jms.html">
+            
+                <a href="using-jms.html">
+            
+                    
+                    Using JMS
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.9" data-path="using-core.html">
+            
+                <a href="using-core.html">
+            
+                    
+                    Using Core
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.10" data-path="jms-core-mapping.html">
+            
+                <a href="jms-core-mapping.html">
+            
+                    
+                    Mapping JMS Concepts to the Core API
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.11" data-path="client-classpath.html">
+            
+                <a href="client-classpath.html">
+            
+                    
+                    The Client Classpath
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.12" data-path="examples.html">
+            
+                <a href="examples.html">
+            
+                    
+                    Examples
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.13" data-path="wildcard-routing.html">
+            
+                <a href="wildcard-routing.html">
+            
+                    
+                    Routing Messages With Wild Cards
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.14" data-path="wildcard-syntax.html">
+            
+                <a href="wildcard-syntax.html">
+            
+                    
+                    Understanding the Apache ActiveMQ Artemis Wildcard Syntax
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.15" data-path="filter-expressions.html">
+            
+                <a href="filter-expressions.html">
+            
+                    
+                    Filter Expressions
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.16" data-path="persistence.html">
+            
+                <a href="persistence.html">
+            
+                    
+                    Persistence
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.17" data-path="configuring-transports.html">
+            
+                <a href="configuring-transports.html">
+            
+                    
+                    Configuring Transports
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.18" data-path="config-reload.html">
+            
+                <a href="config-reload.html">
+            
+                    
+                    Configuration Reload
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.19" data-path="connection-ttl.html">
+            
+                <a href="connection-ttl.html">
+            
+                    
+                    Detecting Dead Connections
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.20" data-path="slow-consumers.html">
+            
+                <a href="slow-consumers.html">
+            
+                    
+                    Detecting Slow Consumers
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.21" data-path="network-isolation.html">
+            
+                <a href="network-isolation.html">
+            
+                    
+                    Avoiding Network Isolation
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.22" data-path="transaction-config.html">
+            
+                <a href="transaction-config.html">
+            
+                    
+                    Resource Manager Configuration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.23" data-path="flow-control.html">
+            
+                <a href="flow-control.html">
+            
+                    
+                    Flow Control
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.24" data-path="send-guarantees.html">
+            
+                <a href="send-guarantees.html">
+            
+                    
+                    Guarantees of sends and commits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.25" data-path="undelivered-messages.html">
+            
+                <a href="undelivered-messages.html">
+            
+                    
+                    Message Redelivery and Undelivered Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.26" data-path="message-expiry.html">
+            
+                <a href="message-expiry.html">
+            
+                    
+                    Message Expiry
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.27" data-path="large-messages.html">
+            
+                <a href="large-messages.html">
+            
+                    
+                    Large Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.28" data-path="paging.html">
+            
+                <a href="paging.html">
+            
+                    
+                    Paging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.29" data-path="queue-attributes.html">
+            
+                <a href="queue-attributes.html">
+            
+                    
+                    Queue Attributes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.30" data-path="scheduled-messages.html">
+            
+                <a href="scheduled-messages.html">
+            
+                    
+                    Scheduled Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.31" data-path="last-value-queues.html">
+            
+                <a href="last-value-queues.html">
+            
+                    
+                    Last-Value Queues
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.32" data-path="message-grouping.html">
+            
+                <a href="message-grouping.html">
+            
+                    
+                    Message Grouping
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.33" data-path="pre-acknowledge.html">
+            
+                <a href="pre-acknowledge.html">
+            
+                    
+                    Extra Acknowledge Modes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.34" data-path="management.html">
+            
+                <a href="management.html">
+            
+                    
+                    Management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.35" data-path="security.html">
+            
+                <a href="security.html">
+            
+                    
+                    Security
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.36" data-path="resource-limits.html">
+            
+                <a href="resource-limits.html">
+            
+                    
+                    Resource Limits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.37" data-path="jms-bridge.html">
+            
+                <a href="jms-bridge.html">
+            
+                    
+                    The JMS Bridge
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.38" data-path="client-reconnection.html">
+            
+                <a href="client-reconnection.html">
+            
+                    
+                    Client Reconnection and Session Reattachment
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.39" data-path="diverts.html">
+            
+                <a href="diverts.html">
+            
+                    
+                    Diverting and Splitting Message Flows
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.40" data-path="core-bridges.html">
+            
+                <a href="core-bridges.html">
+            
+                    
+                    Core Bridges
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.41" data-path="duplicate-detection.html">
+            
+                <a href="duplicate-detection.html">
+            
+                    
+                    Duplicate Message Detection
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.42" data-path="clusters.html">
+            
+                <a href="clusters.html">
+            
+                    
+                    Clusters
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.43" data-path="ha.html">
+            
+                <a href="ha.html">
+            
+                    
+                    High Availability and Failover
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.44" data-path="graceful-shutdown.html">
+            
+                <a href="graceful-shutdown.html">
+            
+                    
+                    Graceful Server Shutdown
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.45" data-path="libaio.html">
+            
+                <a href="libaio.html">
+            
+                    
+                    Libaio Native Libraries
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.46" data-path="thread-pooling.html">
+            
+                <a href="thread-pooling.html">
+            
+                    
+                    Thread management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.47" data-path="logging.html">
+            
+                <a href="logging.html">
+            
+                    
+                    Logging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.48" data-path="rest.html">
+            
+                <a href="rest.html">
+            
+                    
+                    REST Interface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.49" data-path="embedding-activemq.html">
+            
+                <a href="embedding-activemq.html">
+            
+                    
+                    Embedding Apache ActiveMQ Artemis
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.50" data-path="karaf.html">
+            
+                <a href="karaf.html">
+            
+                    
+                    Apache Karaf
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.51" data-path="spring-integration.html">
+            
+                <a href="spring-integration.html">
+            
+                    
+                    Spring Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.52" data-path="aerogear-integration.html">
+            
+                <a href="aerogear-integration.html">
+            
+                    
+                    AeroGear Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.53" data-path="vertx-integration.html">
+            
+                <a href="vertx-integration.html">
+            
+                    
+                    VertX Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.54" data-path="cdi-integration.html">
+            
+                <a href="cdi-integration.html">
+            
+                    
+                    CDI Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.55" data-path="intercepting-operations.html">
+            
+                <a href="intercepting-operations.html">
+            
+                    
+                    Intercepting Operations
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.56" data-path="protocols-interoperability.html">
+            
+                <a href="protocols-interoperability.html">
+            
+                    
+                    Protocols and Interoperability
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.57" data-path="tools.html">
+            
+                <a href="tools.html">
+            
+                    
+                    Tools
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.58" data-path="maven-plugin.html">
+            
+                <a href="maven-plugin.html">
+            
+                    
+                    Maven Plugin
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.59" data-path="unit-testing.html">
+            
+                <a href="unit-testing.html">
+            
+                    
+                    Unit Testing
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter active" data-level="1.60" data-path="perf-tuning.html">
+            
+                <a href="perf-tuning.html">
+            
+                    
+                    Troubleshooting and Performance Tuning
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.61" data-path="configuration-index.html">
+            
+                <a href="configuration-index.html">
+            
+                    
+                    Configuration Reference
+            
+                </a>
+            
+
+            
+        </li>
+    
+
+    
+
+    <li class="divider"></li>
+
+    <li>
+        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
+            Published with GitBook
+        </a>
+    </li>
+</ul>
+
+
+                </nav>
+            
+        
+    </div>
+
+    <div class="book-body">
+        
+            <div class="body-inner">
+                
+                    
+
+<div class="book-header" role="navigation">
+    
+
+    <!-- Title -->
+    <h1>
+        <i class="fa fa-circle-o-notch fa-spin"></i>
+        <a href="." >Troubleshooting and Performance Tuning</a>
+    </h1>
+</div>
+
+
+
+
+                    <div class="page-wrapper" tabindex="-1" role="main">
+                        <div class="page-inner">
+                            
+<div id="book-search-results">
+    <div class="search-noresults">
+    
+                                <section class="normal markdown-section">
+                                
+                                <h1 id="performance-tuning">Performance Tuning</h1>
+<p>In this chapter we&apos;ll discuss how to tune Apache ActiveMQ Artemis for optimum
+performance.</p>
+<h2 id="tuning-persistence">Tuning persistence</h2>
+<ul>
+<li><p>Put the message journal on its own physical volume. If the disk is
+shared with other processes e.g. transaction co-ordinator, database
+or other journals which are also reading and writing from it, then
+this may greatly reduce performance since the disk head may be
+skipping all over the place between the different files. One of the
+advantages of an append only journal is that disk head movement is
+minimised - this advantage is destroyed if the disk is shared. If
+you&apos;re using paging or large messages make sure they&apos;re ideally put
+on separate volumes too.</p>
+</li>
+<li><p>Minimum number of journal files. Set <code>journal-min-files</code> to a number
+of files that would fit your average sustainable rate.  This number
+represents the lower threshold of the journal file pool.</p>
+</li>
+<li><p>To set the upper threshold of the journal file pool. (<code>journal-min-files</code> being
+the lower threshold).  Set <code>journal-pool-files</code> to a number that represents
+something near your maximum expected load.  The journal will spill over
+the pool should it need to, but will shrink back to the upper threshold, 
+when possible.  This allows reuse of files, without taking up more disk
+space than required.  If you see new files being created on the journal
+data directory too often, i.e. lots of data is being persisted, 
+you need to increase the journal-pool-size, this way the journal would
+reuse more files instead of creating new data files, increasing performance</p>
+</li>
+<li><p>Journal file size. The journal file size should be aligned to the
+capacity of a cylinder on the disk. The default value 10MiB should
+be enough on most systems.</p>
+</li>
+<li><p>Use AIO journal. If using Linux, try to keep your journal type as
+AIO. AIO will scale better than Java NIO.</p>
+</li>
+<li><p>Tune <code>journal-buffer-timeout</code>. The timeout can be increased to
+increase throughput at the expense of latency.</p>
+</li>
+<li><p>If you&apos;re running AIO you might be able to get some better
+performance by increasing <code>journal-max-io</code>. DO NOT change this
+parameter if you are running NIO.</p>
+</li>
+</ul>
+<h2 id="tuning-jms">Tuning JMS</h2>
+<p>There are a few areas where some tweaks can be done if you are using the
+JMS API</p>
+<ul>
+<li><p>Disable message id. Use the <code>setDisableMessageID()</code> method on the
+<code>MessageProducer</code> class to disable message ids if you don&apos;t need
+them. This decreases the size of the message and also avoids the
+overhead of creating a unique ID.</p>
+</li>
+<li><p>Disable message timestamp. Use the <code>setDisableMessageTimeStamp()</code>
+method on the <code>MessageProducer</code> class to disable message timestamps
+if you don&apos;t need them.</p>
+</li>
+<li><p>Avoid <code>ObjectMessage</code>. <code>ObjectMessage</code> is convenient but it comes at
+a cost. The body of a <code>ObjectMessage</code> uses Java serialization to
+serialize it to bytes. The Java serialized form of even small
+objects is very verbose so takes up a lot of space on the wire, also
+Java serialization is slow compared to custom marshalling
+techniques. Only use <code>ObjectMessage</code> if you really can&apos;t use one of
+the other message types, i.e. if you really don&apos;t know the type of
+the payload until run-time.</p>
+</li>
+<li><p>Avoid <code>AUTO_ACKNOWLEDGE</code>. <code>AUTO_ACKNOWLEDGE</code> mode requires an
+acknowledgement to be sent from the server for each message received
+on the client, this means more traffic on the network. If you can,
+use <code>DUPS_OK_ACKNOWLEDGE</code> or use <code>CLIENT_ACKNOWLEDGE</code> or a
+transacted session and batch up many acknowledgements with one
+acknowledge/commit.</p>
+</li>
+<li><p>Avoid durable messages. By default JMS messages are durable. If you
+don&apos;t really need durable messages then set them to be non-durable.
+Durable messages incur a lot more overhead in persisting them to
+storage.</p>
+</li>
+<li><p>Batch many sends or acknowledgements in a single transaction.
+Apache ActiveMQ Artemis will only require a network round trip on the commit, not
+on every send or acknowledgement.</p>
+</li>
+</ul>
+<h2 id="other-tunings">Other Tunings</h2>
+<p>There are various other places in Apache ActiveMQ Artemis where we can perform some
+tuning:</p>
+<ul>
+<li><p>Use Asynchronous Send Acknowledgements. If you need to send durable
+messages non transactionally and you need a guarantee that they have
+reached the server by the time the call to send() returns, don&apos;t set
+durable messages to be sent blocking, instead use asynchronous send
+acknowledgements to get your acknowledgements of send back in a
+separate stream, see <a href="send-guarantees.html">Guarantees of sends and commits</a>
+for more information on this.</p>
+</li>
+<li><p>Use pre-acknowledge mode. With pre-acknowledge mode, messages are
+acknowledged <code>before</code> they are sent to the client. This reduces the
+amount of acknowledgement traffic on the wire. For more information
+on this, see <a href="pre-acknowledge.html">Extra Acknowledge Modes</a>.</p>
+</li>
+<li><p>Disable security. You may get a small performance boost by disabling
+security by setting the <code>security-enabled</code> parameter to <code>false</code> in
+<code>broker.xml</code>.</p>
+</li>
+<li><p>Disable persistence. If you don&apos;t need message persistence, turn it
+off altogether by setting <code>persistence-enabled</code> to false in
+<code>broker.xml</code>.</p>
+</li>
+<li><p>Sync transactions lazily. Setting <code>journal-sync-transactional</code> to
+<code>false</code> in <code>broker.xml</code> can give you better
+transactional persistent performance at the expense of some
+possibility of loss of transactions on failure. See  <a href="send-guarantees.html">Guarantees of sends and commits</a>
+for more information.</p>
+</li>
+<li><p>Sync non transactional lazily. Setting
+<code>journal-sync-non-transactional</code> to <code>false</code> in
+<code>broker.xml</code> can give you better non-transactional
+persistent performance at the expense of some possibility of loss of
+durable messages on failure. See  <a href="send-guarantees.html">Guarantees of sends and commits</a>
+for more information.</p>
+</li>
+<li><p>Send messages non blocking. Setting <code>block-on-durable-send</code> and
+<code>block-on-non-durable-send</code> to <code>false</code> in the jms config (if
+you&apos;re using JMS and JNDI) or directly on the ServerLocator. This
+means you don&apos;t have to wait a whole network round trip for every
+message sent. See  <a href="send-guarantees.html">Guarantees of sends and commits</a>
+for more information.</p>
+</li>
+<li><p>If you have very fast consumers, you can increase
+consumer-window-size. This effectively disables consumer flow
+control.</p>
+</li>
+<li><p>Use the core API not JMS. Using the JMS API you will have slightly
+lower performance than using the core API, since all JMS operations
+need to be translated into core operations before the server can
+handle them. If using the core API try to use methods that take
+<code>SimpleString</code> as much as possible. <code>SimpleString</code>, unlike
+java.lang.String does not require copying before it is written to
+the wire, so if you re-use <code>SimpleString</code> instances between calls
+then you can avoid some unnecessary copying.</p>
+</li>
+</ul>
+<h2 id="tuning-transport-settings">Tuning Transport Settings</h2>
+<ul>
+<li><p>TCP buffer sizes. If you have a fast network and fast machines you
+may get a performance boost by increasing the TCP send and receive
+buffer sizes. See the <a href="configuring-transports.html">Configuring the Transport</a>
+for more information on this.</p>
+<blockquote>
+<p><strong>Note</strong></p>
+<p>Note that some operating systems like later versions of Linux
+include TCP auto-tuning and setting TCP buffer sizes manually can
+prevent auto-tune from working and actually give you worse
+performance!</p>
+</blockquote>
+</li>
+<li><p>Increase limit on file handles on the server. If you expect a lot of
+concurrent connections on your servers, or if clients are rapidly
+opening and closing connections, you should make sure the user
+running the server has permission to create sufficient file handles.</p>
+<p>This varies from operating system to operating system. On Linux
+systems you can increase the number of allowable open file handles
+in the file <code>/etc/security/limits.conf</code> e.g. add the lines</p>
+<pre><code>serveruser     soft    nofile  20000
+serveruser     hard    nofile  20000
+</code></pre><p>This would allow up to 20000 file handles to be open by the user
+<code>serveruser</code>.</p>
+</li>
+<li><p>Use <code>batch-delay</code> and set <code>direct-deliver</code> to false for the best
+throughput for very small messages. Apache ActiveMQ Artemis comes with a
+preconfigured connector/acceptor pair (<code>netty-throughput</code>) in
+<code>broker.xml</code> and JMS connection factory
+(<code>ThroughputConnectionFactory</code>) in <code>activemq-jms.xml</code>which can be
+used to give the very best throughput, especially for small
+messages. See the <a href="configuring-transports.html">Configuring the Transport</a>
+for more information on this.</p>
+</li>
+</ul>
+<h2 id="tuning-the-vm">Tuning the VM</h2>
+<p>We highly recommend you use the latest Java JVM for the best
+performance. We test internally using the Sun JVM, so some of these
+tunings won&apos;t apply to JDKs from other providers (e.g. IBM or JRockit)</p>
+<ul>
+<li><p>Garbage collection. For smooth server operation we recommend using a
+parallel garbage collection algorithm, e.g. using the JVM argument
+<code>-XX:+UseParallelOldGC</code> on Sun JDKs.</p>
+</li>
+<li><p>Memory settings. Give as much memory as you can to the server.
+Apache ActiveMQ Artemis can run in low memory by using paging (described in <a href="paging.html">Paging</a>) but
+if it can run with all queues in RAM this will improve performance.
+The amount of memory you require will depend on the size and number
+of your queues and the size and number of your messages. Use the JVM
+arguments <code>-Xms</code> and <code>-Xmx</code> to set server available RAM. We
+recommend setting them to the same high value.</p>
+</li>
+<li><p>Aggressive options. Different JVMs provide different sets of JVM
+tuning parameters, for the Sun Hotspot JVM the full list of options
+is available
+<a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html" target="_blank">here</a>.
+We recommend at least using <code>-XX:+AggressiveOpts</code> and <code>-XX:+UseFastAccessorMethods</code>.
+You may get some mileage with the other tuning parameters depending
+on your OS platform and application usage patterns.</p>
+</li>
+</ul>
+<h2 id="avoiding-anti-patterns">Avoiding Anti-Patterns</h2>
+<ul>
+<li><p>Re-use connections / sessions / consumers / producers. Probably the
+most common messaging anti-pattern we see is users who create a new
+connection/session/producer for every message they send or every
+message they consume. This is a poor use of resources. These objects
+take time to create and may involve several network round trips.
+Always re-use them.</p>
+<blockquote>
+<p><strong>Note</strong></p>
+<p>Some popular libraries such as the Spring JMS Template are known
+to use these anti-patterns. If you&apos;re using Spring JMS Template
+and you&apos;re getting poor performance you know why. Don&apos;t blame
+Apache ActiveMQ Artemis! The Spring JMS Template can only safely be used in an
+app server which caches JMS sessions (e.g. using JCA), and only
+then for sending messages. It cannot be safely be used for
+synchronously consuming messages, even in an app server.</p>
+</blockquote>
+</li>
+<li><p>Avoid fat messages. Verbose formats such as XML take up a lot of
+space on the wire and performance will suffer as result. Avoid XML
+in message bodies if you can.</p>
+</li>
+<li><p>Don&apos;t create temporary queues for each request. This common
+anti-pattern involves the temporary queue request-response pattern.
+With the temporary queue request-response pattern a message is sent
+to a target and a reply-to header is set with the address of a local
+temporary queue. When the recipient receives the message they
+process it then send back a response to the address specified in the
+reply-to. A common mistake made with this pattern is to create a new
+temporary queue on each message sent. This will drastically reduce
+performance. Instead the temporary queue should be re-used for many
+requests.</p>
+</li>
+<li><p>Don&apos;t use Message-Driven Beans for the sake of it. As soon as you
+start using MDBs you are greatly increasing the codepath for each
+message received compared to a straightforward message consumer,
+since a lot of extra application server code is executed. Ask
+yourself do you really need MDBs? Can you accomplish the same task
+using just a normal message consumer?</p>
+</li>
+</ul>
+<h2 id="troubleshooting">Troubleshooting</h2>
+<h3 id="udp-not-working">UDP not working</h3>
+<p>In certain situations UDP used on discovery may not work. Typical situations are:</p>
+<ol>
+<li>The nodes are behind a firewall. If your nodes are on different machines then it is possible that the firewall is blocking the multicasts. you can test this by disabling the firewall for each node or adding the appropriate rules.</li>
+<li>You are using a home network or are behind a gateway. Typically home networks will redirect any UDP traffic to the Internet Service Provider which is then either dropped by the ISP or just lost. To fix this you will need to add a route to the firewall/gateway that will redirect any multicast traffic back on to the local network instead.</li>
+<li><p>All the nodes are in one machine. If this is the case then it is a similar problem to point 2 and the same solution should fix it. Alternatively you could add a multicast route to the loopback interface. On linux the command would be:</p>
+<pre><code class="lang-sh"><span class="hljs-comment"># you should run this as root</span>
+route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
+</code></pre>
+<p>This will redirect any traffic directed to the 224.0.0.0 to the loopback interface. This will also work if you have no network at all.</p>
+<ul>
+<li>on Mac OS X, the command is slightly different:<pre><code class="lang-sh">sudo route add 224.0.0.0 127.0.0.1 -netmask 240.0.0.0
+</code></pre>
+</li>
+</ul>
+</li>
+</ol>
+
+                                
+                                </section>
+                            
+    </div>
+    <div class="search-results">
+        <div class="has-results">
+            
+            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
+            <ul class="search-results-list"></ul>
+            
+        </div>
+        <div class="no-results">
+            
+            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
+            
+        </div>
+    </div>
+</div>
+
+                        </div>
+                    </div>
+                
+            </div>
+
+            
+                
+                <a href="unit-testing.html" class="navigation navigation-prev " aria-label="Previous page: Unit Testing">
+                    <i class="fa fa-angle-left"></i>
+                </a>
+                
+                
+                <a href="configuration-index.html" class="navigation navigation-next " aria-label="Next page: Configuration Reference">
+                    <i class="fa fa-angle-right"></i>
+                </a>
+                
+            
+        
+    </div>
+
+    <script>
+        var gitbook = gitbook || [];
+        gitbook.push(function() {
+            gitbook.page.hasChanged({"page":{"title":"Troubleshooting and Performance Tuning","level":"1.60","depth":1,"next":{"title":"Configuration Reference","level":"1.61","depth":1,"path":"configuration-index.md","ref":"configuration-index.md","articles":[]},"previous":{"title":"Unit Testing","level":"1.59","depth":1,"path":"unit-testing.md","ref":"unit-testing.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mo
 bi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"apache/activemq-artemis","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"ActiveMQ Artemis Documentation","links":{"home":"http://activemq.apache.org/","issues":"http://activemq.apache.org/","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis User Guide and Reference Documentation"},"file":{"path":"perf-tuning.md","mtime":"2016-12-07T20:53:24.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2016-12-12T15:50:38.065Z"},"basePath":".","book":{"language":""}});
+        });
+    </script>
+</div>
+
+        
+    <script src="gitbook/gitbook.js"></script>
+    <script src="gitbook/theme.js"></script>
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
+        
+    
+
+    </body>
+</html>
+