To set the packet size value for the Native code base, an entry is required
in the Windows® Registry.
The packet size has the most profound affect on the number of packets sent
across the network. To determine the best packet size for your network, some
empirical testing is required. You will need a sniffer tool for this.
An Ethernet LAN typically will have a maximum transmission unit (MTU) of
1500; however, this may be lowered by a router. In order to determine the
effective MTU of your network, it is best to force some IP fragmentation;
that is, forcing IP to split the data up. First of all, set the packet size
to a value larger than the expected MTU of your network. Next, send messages
from one MQe queue manager to another of a size greater than the packet size
so the adapter has to split the data up. By looking at the results from the
sniffer tool, you should see some IP fragmentation, which will determine the
effective MTU of the network.
Having determined the MTU of the network, you now need to set the packet
size allowing for the protocol headers:
- TCP/ IP has a total header length of 40 bytes (20 bytes for IP and 20
bytes for TCP).
- UDP/IP has a total header length of 44 bytes (12 bytes for MQe, 12 bytes
for UDP and 20 bytes for IP). When creating the packets, the MQe UDP/IP adapter
will take into account its own header information so all that needs to be
taken into account are the UDP and IP headers, amounting to 32 bytes. If the
MTU of the network is 532, the packet size should be set to 500. If the packet
size is less then 30, the default packet size will be used.
- HTTP is a little more difficult to quantify as the amount of data put
into the HTTP header by MQe will vary depending on whether a proxy is being
used or if a servlet is being accessed and the length of data being sent.
The minimum added by MQe is 116 bytes of data which assumes the length will
fit into 3 bytes for its string representation. Additional bytes need to be
allowed for if proxies or servlets are being used.
- Ethernet has a 14 byte header.
- Java™
- Default value TCP/IP 4096, UDP/IP 500
- Set using the Java property com.ibm.mqe.adapters.MQeCommunicationsAdapter.packetSize
- Native
- Default value 500
- Set using the Windows Registry: .
The value is a string and should represent the size in bytes.