Re: Tuning JVM

From: Nathan Zumwalt (nathanz_at_hotmail.com)
Date: 12/31/03


Date: 31 Dec 2003 07:23:50 -0800

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

decent_tiger@yahoo.com (Mark) wrote in message news:<6261f9fc.0312301710.55691c54@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(ByteArrayOutputStream.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.



Relevant Pages

  • Malloc, free and thread-safety
    ... I get intermittent exceptions such as: ... HEAP[recv.exe]: HEAP: Free Heap block 316d978 modified at 316d988 after it ... I've checked carefully that malloc() and freeare ... The exceptions are infrequent and intermittent for basically the same traces ...
    (microsoft.public.dotnet.languages.vc)
  • Re: World Popualtion
    ... speaking nations, because with a few exceptions, those are the people ... phlegm wrote: ...
    (rec.sport.unicycling)
  • bad_alloc
    ... whether or not we are using auto_ptr to allocate new object on heap ... when we met with such exceptions, we catch it and try to ... mininize the operation in catch handler block (since when bad_alloc occurs, ...
    (microsoft.public.vc.language)
  • bad_alloc
    ... I am wondering except when there is no memory on heap, are there any other situations when we will get bad_alloc exceptions? ... invalid input of the size will cause exception? ...
    (microsoft.public.win32.programmer.kernel)