IBM Java & memory mapped IO

B

Ben_

Not much I can say on this exact problem.

A few hints:
.. activate verbose GC logs and review it
.. apply recent JDK fixes (obtained from IBM support site)
.. see the must gather for "out of memory", it contains useful tips

HTH.
 
M

Mark Thornton

Tim said:
We have a serious problem with the IBM Java
Development Kit 1.4.2_06 und memory mapped IO via
nio and FileChannel.map.
The maximum heap space is set to 1GB,
the currently used memory (Runtime.totalMemory()) is
350MB, the file size 300MB. Seems to be uncritical
compared to the heap memory set. Nevertheless we always get
an IOException: Not enought memory available

Switching the JDK to SUN
or to 1.5 is unfortunately not possible
because we work in a very big project.

Has anyone an idea why this can happen?

Any help welcome,

Tim v.d.B.

You have probably out of address space. To memory map a 300MB file will
require 300MB of contiguous memory in your user address space. You have
used > 1GB with the heap. You don't say which OS, but on Windows the
user address space is at most 2GB and quite a bit of this is fragmented
by various DLLs. You also have the JVM to allow for. Try reducing the
maximum heap size to 500MB. You should then have plenty of remaining
address space. Note that specifying a maximum heap size of 1GB reserves
1GB of address space which can then not be used for memory mapping
(which is outside of the heap).

Regards,
Mark Thornton
 
?

=?ISO-8859-1?Q?Tim_vor_der_Br=FCck?=

We have a serious problem with the IBM Java
Development Kit 1.4.2_06 und memory mapped IO via
nio and FileChannel.map.
The maximum heap space is set to 1GB,
the currently used memory (Runtime.totalMemory()) is
350MB, the file size 300MB. Seems to be uncritical
compared to the heap memory set. Nevertheless we always get
an IOException: Not enought memory available

Switching the JDK to SUN
or to 1.5 is unfortunately not possible
because we work in a very big project.

Has anyone an idea why this can happen?

Any help welcome,

Tim v.d.B.
 
?

=?ISO-8859-1?Q?Tim_vor_der_Br=FCck?=

Tim said:
We have a serious problem with the IBM Java
Development Kit 1.4.2_06 und memory mapped IO via
nio and FileChannel.map.
The maximum heap space is set to 1GB,
the currently used memory (Runtime.totalMemory()) is
350MB, the file size 300MB. Seems to be uncritical
compared to the heap memory set. Nevertheless we always get
an IOException: Not enought memory available

Switching the JDK to SUN
or to 1.5 is unfortunately not possible
because we work in a very big project.

Has anyone an idea why this can happen?

Any help welcome,

Tim v.d.B.
I forgot to mention the machine has 4GB memory and
no other significant process is running except the
operating system and ours.
 
B

Ben_

Oh, I overlooked the fact that the file is 300 MB large, and yes,
fragmentation is the likely cause.

Reviewing the verbose GC logs will confirm.

If you're interested in understanding heap fragmentation issues, you'll want
to check the IBM JVM Diagnostic Guide at
http://www.ibm.com/developerworks/java/jdk/diagnosis. It's worth reading
anyhow.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top