470,855 Members | 1,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Tuning JVM

I am using JVM version 1.4.1 (java.vm.version=1.4.1-1) to run my
program on UNIX. When I run my program using the default JVM settings,
I don't get exceptions but my program crashes after 30 minutes without
throwing any exception. I thought, tuning of JVM would be a solution,
so I ran my program using -Xms128m -Xmx128m and now it gives me an
OutOfMemory error within 2 minutes. -

Unknown error:
java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.write(ByteArrayOutpu tStream.java:95)

Isn't JVM heap size by default set to 64M ? If so, why would my
program give me memory error sooner when I have increased and set max
heap size to 128M. Can anyone throw some light on this based on their
experience.....

Thanks in advance.
Jul 17 '05 #1
2 6460
I think the lower bound of the heap size is set to 64M, but the upper
bound is much higher by default.

Before you start tuning your JVM, I'd make sure you're not swallowing
an exceptions that are getting thrown. If you're sure that all
exceptions are being caught and at least printed out to the console,
you might want to looks at turning off hotspot. Or, manually
specifying the mode to -client or -server.

If you're still not getting anywhere, you might want to try using a
profiler, such as JProbe.

-Nathan

de**********@yahoo.com (Mark) wrote in message news:<62**************************@posting.google. com>...
I am using JVM version 1.4.1 (java.vm.version=1.4.1-1) to run my
program on UNIX. When I run my program using the default JVM settings,
I don't get exceptions but my program crashes after 30 minutes without
throwing any exception. I thought, tuning of JVM would be a solution,
so I ran my program using -Xms128m -Xmx128m and now it gives me an
OutOfMemory error within 2 minutes. -

Unknown error:
java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.write(ByteArrayOutpu tStream.java:95)

Isn't JVM heap size by default set to 64M ? If so, why would my
program give me memory error sooner when I have increased and set max
heap size to 128M. Can anyone throw some light on this based on their
experience.....

Thanks in advance.

Jul 17 '05 #2
na*****@hotmail.com (Nathan Zumwalt) wrote in message news:<52**************************@posting.google. com>...
I think the lower bound of the heap size is set to 64M, but the upper
bound is much higher by default.

Before you start tuning your JVM, I'd make sure you're not swallowing
an exceptions that are getting thrown. If you're sure that all
exceptions are being caught and at least printed out to the console,
you might want to looks at turning off hotspot. Or, manually
specifying the mode to -client or -server.

If you're still not getting anywhere, you might want to try using a
profiler, such as JProbe.

-Nathan

de**********@yahoo.com (Mark) wrote in message news:<62**************************@posting.google. com>...
I am using JVM version 1.4.1 (java.vm.version=1.4.1-1) to run my
program on UNIX. When I run my program using the default JVM settings,
I don't get exceptions but my program crashes after 30 minutes without
throwing any exception. I thought, tuning of JVM would be a solution,
so I ran my program using -Xms128m -Xmx128m and now it gives me an
OutOfMemory error within 2 minutes. -

Unknown error:
java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.write(ByteArrayOutpu tStream.java:95)

Isn't JVM heap size by default set to 64M ? If so, why would my
program give me memory error sooner when I have increased and set max
heap size to 128M. Can anyone throw some light on this based on their
experience.....

Thanks in advance.


Thanks for the response. But, how will I know what the default heap
size settings of the JVM (default minimum heap size and maximum heap
size). Is there a way to display the heap size settings and other
properties of the JVM.

Thanks in advance,
-Mark
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Clemente | last post: by
3 posts views Thread by Maryam | last post: by
1 post views Thread by Jean-Marc Blaise | last post: by
13 posts views Thread by atlaste | last post: by
reply views Thread by Medhatithi | last post: by
3 posts views Thread by dunleav1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.