[kepler-dev] Question regarding startup parameters

Michal Owsiak michal.owsiak at man.poznan.pl
Wed Apr 23 03:53:38 PDT 2014


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

-- 
Michal Owsiak <michal.owsiak at man.poznan.pl>

Institute of Bioorganic Chemistry PAS
Poznan Supercomputing and Networking Center
Noskowskiego 12/14, 61-704 Poznan, POLAND

Phone: 00 48 61 858 21 81

http://www.man.poznan.pl


More information about the Kepler-dev mailing list