Increase java heap size

When you install this way, these settings are kept in the Windows Registry.
If you have the start menu items, the easiest way to change them is to go to
Start -> Programs -> Apache Tomcat -> Tomcat Configuration -> Java (tab).
There are fields for your initial and max heap sizes.

First Calculate the number of threads you can create

(MaxProcessMemory – JVMMemory – ReservedOsMemory) / (ThreadStackSize) = Number of threads

Example:

For Java 1.5 you will get the following results assuming that the OS reserves about 120MB:

1.5GB allocated to JVM: (2GB-1.5Gb-120MB)/(1MB) = ~380 threads

1.0GB allocated to JVM: (2GB-1.0Gb-120MB)/(1MB) = ~880 threads

Your Java Options Example:

-Xms 512m
-Xmx 1024m
-Xss256k
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=128m

or

Append following line in catalina.bat in front of JAVA_OPTS
-Xms1024m -Xmx1024m -XX:MaxPermSize=128m

set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=”%CATALINA_BASE%\conf\logging.properties” -Xms1024m -Xmx1024m -XX:MaxPermSize=128m

About ashokabhat

I am a C,C ,JAVA,Adobe Flex,.NET Programmer Currently working as a Software Developer
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s