This discussion is archived
2 Replies Latest reply: Sep 6, 2013 5:06 PM by jschellSomeoneStoleMyAlias RSS

Multiple Java Apps in same JVM

user11478174 Newbie
Currently Being Moderated

Hi,

 

 

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.

  • 1. Re: Multiple Java Apps in same JVM
    BIJ001 Explorer
    Currently Being Moderated

    > Can I refresh java heap before submitting another set of java applications?

     

    Wah do you mean by "refresh java heap"?

    They are different processes, that is, different JVM's, with different memory contents (heaps).

  • 2. Re: Multiple Java Apps in same JVM
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated

    > 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.)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points