Depending on what you're doing, java image processing may take
significant non-java-heap memory resources. The phrase, "lots of RAM",
is not as descriptive as you think. However, when running 32-bit Java,
it doesn't matter very much how much RAM your total system has because
the maximum addressable space of your java process is going to be 2G.
That 2G of RAM is the limit for the java heap that you allocate
combined with any non-java-heap memory that your program uses.
In general, the amount of non-java-heap memory used by java programs
is relatively small. But not all java programs are "general". In my
experience, two examples of potential big drains on this memory pool
are threads (especially threads with large stack sizes that don't need
large stack sizes) and image processing.
You say you're allocating a maximum 1500M java heap. But it looks like
you're not even getting close to that figure from the Full GC info you
provided. In fact, the java heap is actually jumping *down* in size,
which is something I haven't seen before. But it would seem to
indicate that it's attempting to give up java heap memory for other
non-java-heap activities (most likely the image processing is my guess).
I'd try significantly *decreasing* the maximum size of the java heap.
But if that does help, I'm guessing it won't be enough. You might need
to re-examine how you're doing the image processing and put some kind
of cap on how many simultaneous images you're processing, or how large
you allow the images to be, or something along those lines.
If you're spawning a lot of threads simultaneously that are not being
used by highly recursive operations, you can also look into reducing
the thread stack size via the -Xss argument (or re-architecting how
you're using threads).
Rob
On Sep 22, 2008, at 11:40, Bill Janssen wrote:
I'm running an image-processing program on OS X 10.5.4 on Intel
(Core 2
Duo), Java 5, 32-bit client JVM, with lots of RAM, and am getting a
bus
error from Java. Here's the end of a log file that shows -verbose:gc
along with the stack trace:
I've run this under gdb, but there are no symbols in the Apple Java,
so
the trace is pretty much uninformative. I'm looking for tips and
tricks
for finding out what's causing this. I'm running with -Xmx1500m, as
well.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden