[kepler-dev] Question regarding startup parameters

Michal Owsiak michalo at man.poznan.pl
Wed Apr 23 12:05:34 PDT 2014


It looks like I have outdated release of Kepler 2.4.

You are right. If I take a look into Run.java here:

https://code.kepler-project.org/code/kepler/releases/release-branches/build-area-2.4

Everything is fine:

         java.setClassname(main);
         java.createJvmarg().setLine("-Xmx" + jvmMaxMemory);
         java.createJvmarg().setLine("-Xms" + jvmMinMemory);

Which is desired behavior.

In my release of Kepler, this part of code reads:

java.createJvmarg().setLine("-Xmx" + jvmMaxMemory);
java.createJvmarg().setLine("-Xms" + jvmMinMemory);
java.createJvmarg().setLine("-Xss" + jvmMinMemory);

I will fix that locally.

Cheers

Michal

>
> Hi Michal,
>
> Before Kepler 2.4, the minimum memory value in memory.xml
> was used with "-Xss". This was changed to "-Xms" in 2.4.
> Do you want to set stack size ("-Xss") too?
>
>    --dan
>
> On 4/23/14 3:53 AM, Michal Owsiak wrote:
>> Hello Kepler team,
>>
>> I have question related to startup parameters of Kepler sub process (JVM
>> started by Run.java).
>>
>> I am starting Kepler and what I can see is that it starts two Java
>> processes.
>>
>> 1. used for initialization
>> 2. used for actual Kepler application
>>
>> Inside build-area/build-area/src/org/kepler/build/Run.java
>>
>> there is following fragment of code (Kepler 2.4):
>>
>> java.createJvmarg().setLine("-Xmx" + jvmMaxMemory);
>> java.createJvmarg().setLine("-Xms" + jvmMinMemory);
>> java.createJvmarg().setLine("-Xss" + jvmMinMemory);
>>
>> relese 2.3 has slightly different fragment:
>>
>> java.createJvmarg().setLine("-Xmx" + jvmMaxMemory);
>> java.createJvmarg().setLine("-Xss" + jvmMinMemory);
>>
>> The issue here is, that -Xss is defined per thread.
>>
>>  From Oracle's JRockit explanation:
>>
>> "The -Xss flag specifies how much stack each thread should be allocated.
>> Thread stacks are the memory areas allocated for each Java thread for
>> their internal use. This is where the thread stores its execution state.
>> It normally makes little sense to increase this size, unless there is
>> plenty of recursion or a large amount of stack local information. For
>> example, -Xss:256k will set the thread stack size to 256 KB."
>>
>> It means, that each time new thread is started we will try to allocate
>> as much memory as declared by jvmMinMemor, that is read from:
>>
>> <entry key="min">1000m</entry>
>>
>> inside
>>
>> build-area/settings/memory.xml
>>
>> The point here is that current code doesn't allow to allocate certain
>> amount of memory while JVM is started. If I will declare that I want 2G
>> at minimum, it means that each thread will gain 2G as well for it's
>> internal stack.
>>
>> Is that correct?
>>
>> I think there should be another setting inside memory.xml, e.g.
>>
>> <entry key="stack">128k</entry>
>>
>> Cheers
>>
>> Michal
>>
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>



More information about the Kepler-dev mailing list