By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,541 Members | 1,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,541 IT Pros & Developers. It's quick & easy.

Tuning JVM

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.