| Apache Qpid > Index > Qpid Java Documentation > Qpid Java How To > Tune Broker and Client Memory Usage |
Home
Download
Getting Started
Documentation
Mailing Lists
Issue Reporting
FAQ/How to
Getting Involved
Qpid Integrated with..
Source Repository
Building Qpid
Developer Pages
QMF
People
License
Project Status
Acknowledgments
What is AMQP ?
AMQP Specification Download

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.
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.
In your broker configuration file the socketSend/ReceiveBuffer value of 32768 is where the buffer size is specified.
Currently your configuration file will contain the following two entries:
<connector> ... <socketReceiveBuffer>32768</socketReceiveBuffer> <socketSendBuffer>32768</socketSendBuffer> </connector>
Modifying these will adjust the size of the ByteBuffers used in conjunction with the socket.
Adjusting the client buffers can also assist your client heap management if you are prefetching a large number of messages.
However, adjusting this will not have any affect on the broker's memory usage.
If you also want to modify the client buffer size then there are two system properties that need set:
amqj.sendBufferSize amqj.receiveBufferSize
These need to be set prior to making the initial connection.
For more details on these properties see: System Properties