You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ronak Sutaria <ro...@gmail.com> on 2006/02/20 19:58:33 UTC

JVM Option -Xmx (Windows registry entry)

Hi,

I have read the Tomcat FAQs on the Out.Of.Memory error. Based on it we have
tried the -Xmx value and seen a difference in the performance. But there was
an effect that adding the -Xmx value to the registry was producing which I
was trying to understand (and hoping someone could help with).
We are running Tomcat 4.1.3 on Windows 2000.

What is happening is as follows-
We have a DB related application servlet which uses the Tomcat.

Case 1: When we do not add the 'JVM Option Number' with the value -Xmx66 to
the windows registry, Tomcat runs for a while, grows its memory consumption
to about 90M and then gives an Out.Of.Memory error at the end of that
operation.

Case 2: When we add the '-Xmx' option in the windows registry, Tomcat this
time also grows its memory consumption to 90M (in this case little slower
than before), but this time it does not give the Out.Of.Memory error.

In both the above cases Tomcat grows to the same memory size (to the byte).
While the second option did solve our problem for the moment, the question I
had was as follows.

1. Since we had given the max memory as 66M what is this value used for?
(The tomcat still seems to be using the 90M when it needs to)

2. Why was it that the settings in case 2 seemed to resolve the problem when
the memory used in both the cases was identical?


Any pointers would be extremely helpful. If someone could point to the right
source codes, that would be good also.


Thanks,
Ronak