I have created a shell script which calls my java application with heap size as below:
/bin/java -Xms:3072M -Xmx:3072M ...
I'm calling the shell script multiple times in the background to create multiple instances of my java application in the same box. I have set a limit of 5 for java applications at any point of time. But what I'm experiencing is that first few sets of java application finish very fast (almost 3 mins) but last few sets taking a lot of time (around 10 mins). The quantity of data processed by all java applications is same but why later sets of java application is taking longer?
Can I do something here so that later sets of apps also completes in 3 mins? Can I refresh java heap before submitting another set of java applications? Java application is not mine but I have purchased from 3rd party. Please help!!!
Thanks in advance.
> why later sets of java application is taking longer?
Probably because of CPU usage. But could be memory.
>Can I do something here so that later sets of apps also completes in 3 mins
You tune the task, the complete task, to the box. That means you must understand in detail what is taking time and then architect that to make the best use of the available CPUs and memory (and other resources as used by the task.)