Profiling Large Heaps on 1.4

Questions about YourKit Java Profiler
Post Reply
serge007
Posts: 2
Joined: Tue Mar 07, 2006 8:18 pm

Profiling Large Heaps on 1.4

Post by serge007 »

The documentation mentions that there are issues with profiling large heaps on 1.4 class VMs. How large is large? :-)

Does it make sense to spend energy profiling 2.5 Gb heap on 1.4.2 VM?
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

To take memory snapshot JVM requires about double size of currently used memory. It means that your Java process should be able to allocate 5-6 Gb of system heap memory. Theoretically it's possible, but in practice it's better to use Java 5.0 profiling API.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

I'd like to add a correction to the provious answer.

The 1.4 JVM indeed temporarily needs almost the same memory as the size of all objects allocated in heap when it captures a snapshot.

If your Java is 32 bit, it is not possible (even theoretically!) to allocate 2*2.5 G (the maximum possible size allocated for all objects) which exceeds 4G memory access limit of 32 applications.

In practice, there are known cases when 1.4 JVM had problems capturing snapshot of a little bit more than 1G size heap.

So the best is to use Java 5 for this task. Java 1.4 is not designed for such tasks.
serge007
Posts: 2
Joined: Tue Mar 07, 2006 8:18 pm

Thanks!

Post by serge007 »

Thank you for clarification!

Serge
Post Reply