cancel
Showing results for 
Search instead for 
Did you mean: 

JVM Heap question -

Former Member
0 Kudos

Hi,

I have two question related to Java Heap on J2EE 7.0.

First Question-

The NewSize and MaxNewSize parameters control the new generation's minimum and maximum size. There is another parameter called NewRatio, which conntrols the ratio of old to young generation. I presume that young and new generation are same thing.

My question is that do I have to set only NewRatio or I have to set NewSize and MaxNewSize as well to control the size of the new generation. If I set all three than which one will supercede what. OR NewSize and MaxNewSize is just a cap so it does go above this value even if the ratio ment to be little higher for young generation.

Second Question -

I have 10GB RAM on out J2EE host PI 7.0. I have only one server. The server heap is set to 2048 in configtool. Both -Xms and -Xmx are same. This is on AIX. When I check my host at UNIX then I always see free memory. I have read that one server0 should have 8GB.

My question is that do I need to increase the -Xms and -Xmx sizes and what is the relationship of heap with RAM. I am limiting the heap to 2048. Both old and young will limited within this heap. Like in ABAP we have RAM then extended and then heap per/session and extended per/session. Is there anything like this in J2EE.

I am very confused.

Please help me.

SC

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To your first question:

In Java 1.3, NewRatio is superseded by MaxNewSize's defaults (rendering NewRatio ineffective for even moderately sized heaps).

In 1.4 and later, MaxNewSize has been effectively set to infinity, and NewRatio can be used instead to set the value of the new generation

Second Question :

Check this thread well explaind by Ventsi Tsachev

Regards

Shaji

Former Member
0 Kudos

Very helpfull thread for second question.

Thank you very much.

For First question I found this -

Between NewSize and NewRatio which option takes precedence?

In jdk 1.4.1 and later, neither has strict precedence. The maximum of NewSize and the size calculated using NewRatio is used. The formula is

min(MaxNewSize, max(NewSize, heap/(NewRatio+1)))

Looks like it uses this formula to control the size.

Thank you.

Sume

Answers (1)

Answers (1)

Former Member
0 Kudos

see note 723909 Java VM settings for J2EE 6.40/7.0