qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Qpid > Tune Broker and Client Memory Usage
Date Fri, 16 Oct 2009 08:41:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=qpid&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="http://cwiki.apache.org/confluence/display/qpid/Tune+Broker+and+Client+Memory+Usage">Tune
Broker and Client Memory Usage</a></h2>
    <h4>Page  <b>added</b> by             <a href="http://cwiki.apache.org/confluence/display/~ritchiem">Martin
Ritchie</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         
<h2><a name="TuneBrokerandClientMemoryUsage-Tuningthebrokerforyourmessagesize."></a>Tuning
the broker for your message size.</h2>

<p>The default buffer size used per message on the broker and client is 32kb if your
message is significantly smaller you can improve your memory usage by lowering this value.
</p>

<h3><a name="TuneBrokerandClientMemoryUsage-Whatsizetouse"></a>What size
to use</h3>
<p>When selecting what size of buffer to include space for any JMS Headers that may
be defined (key and value). You should also include 200 bytes for the AMQP routing details,
if you have very long queue or topic names you may wish to increase this value further.</p>

<h3><a name="TuneBrokerandClientMemoryUsage-Howtochangethebuffersizes"></a>How
to change the buffer sizes</h3>

<h4><a name="TuneBrokerandClientMemoryUsage-BrokerBuffers"></a>Broker Buffers</h4>
<p>In your broker configuration file the socketSend/ReceiveBuffer value of 32768 is
where the buffer size is specified.<br/>
Currently your configuration file will contain the following two entries:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;connector&gt;</span>
    ...
    <span class="code-tag">&lt;socketReceiveBuffer&gt;</span>32768<span
class="code-tag">&lt;/socketReceiveBuffer&gt;</span>
    <span class="code-tag">&lt;socketSendBuffer&gt;</span>32768<span
class="code-tag">&lt;/socketSendBuffer&gt;</span>
<span class="code-tag">&lt;/connector&gt;</span>
</pre>
</div></div>

<p>Modifying these will adjust the size of the ByteBuffers used in conjunction with
the socket.</p>

<h4><a name="TuneBrokerandClientMemoryUsage-ClientBuffers"></a>Client Buffers</h4>
<p>Adjusting the client buffers can also assist your client heap management if you are
prefetching a large number of messages. <br/>
However, adjusting this will not have any affect on the broker's memory usage.<br/>
If you also want to modify the client buffer size then there are two system properties that
need set:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>amqj.sendBufferSize
amqj.receiveBufferSize
</pre>
</div></div>

<p>These need to be set prior to making the initial connection. <br/>
For more details on these properties see: <a href="/confluence/display/qpid/System+Properties#SystemProperties-amqj.sendBufferSize">System
Properties</a></p>

    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="http://cwiki.apache.org/confluence/display/qpid/Tune+Broker+and+Client+Memory+Usage">View
Online</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/qpid/Tune+Broker+and+Client+Memory+Usage?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message