Every message flow has a memory requirement that depends on the routing or transformation logic that is run and the messages to be processed.
If you use an extra instance of a message flow, the memory usage obviously rises. But the memory usage for the instance is lower than if you deploy another identical flow to a different integration server. If you deploy message flows that are different from each other to an integration server, then more virtual memory and real memory is used by that integration server.
There is an initial requirement of memory for deployment, and a subsequent higher requirement after messages are processed. Different message flows use different amounts of extra memory. It is not possible to accurately predict the amount of virtual memory or real memory that is needed for a message flow or message to be processed. Therefore, when you plan your flow, it is recommended to run and measure the requirement after the message flow processes some messages. If you only process 1 or 2 messages a second for a few minutes, the memory usage is unlikely to reach a steady state. Now is the time make the flow work hard: Make all the additional instances start by processing 1000 messages per second for example. After 2 or 3 minutes of processing messages, the memory usage stabilizes if the mix of the messages remains more or less constant (for example, if the messages are not continually increasing in size).
If multiple messages are deployed to the integration server, then ensure that all messages are processed before you observe the peak memory usage of the integration server.
ps -e -o vsz=,rss=,comm=
ps -e -o vsz,rss,cmd
ps -e -o vsz,rss,cmd