Heap fragmentation
During deployment, the DataFlowEngine (DFE) allocates enough memory to allow it to do the deployment and then keeps the memory in a pool that it manages for later reuse. If a subsequent deployment requires a larger contiguous block of memory, the DFE might need to allocate the full amount anew from the remaining process heap. Memory that is retained by the broker for its own reuse is also used for the allocation of runtime objects. Therefore, in development environments, where activities such as varying sized deployments and runtime activity overlap, out-of-storage conditions might arise even when adequate memory appears to be available in the process address space. This condition can occur if, after some activity, insufficient storage remains in the heap to satisfy a request for a contiguous memory block during a deployment.
- Keep the size of each BAR file to a minimum. Try to keep the BAR file sizes to be less than 2 MB. To help
achieve this goal, you can do the following things.
- Use a separate BAR file for each flow.
- Use separate BAR files for the message sets.
- Use only those message sets that are needed for each flow. All message sets might not be needed by all flows.
Deploying the message flows by using these techniques has the added benefit of making it possible to move flows between execution groups without having to recompile the BAR file.