IBM Java & memory mapped IO

Discussion in 'Java' started by Ben_, Jan 5, 2006.

  1. Ben_

    Ben_ Guest

    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.
    Ben_, Jan 5, 2006
    #1
    1. Advertising

  2. Tim vor der Brück wrote:
    > 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
    Mark Thornton, Jan 5, 2006
    #2
    1. Advertising

  3. 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?=, Jan 5, 2006
    #3
  4. Tim vor der Brück wrote:
    > 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.
    =?ISO-8859-1?Q?Tim_vor_der_Br=FCck?=, Jan 5, 2006
    #4
  5. Ben_

    Ben_ Guest

    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.
    Ben_, Jan 7, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    423
  2. Evan Carew

    Re: B+Tree and Memory Mapped Files

    Evan Carew, Apr 1, 2004, in forum: C++
    Replies:
    0
    Views:
    646
    Evan Carew
    Apr 1, 2004
  3. Thomas Matthews

    Re: B+Tree and Memory Mapped Files

    Thomas Matthews, Apr 2, 2004, in forum: C++
    Replies:
    2
    Views:
    765
    Kevin Goodsell
    Apr 2, 2004
  4. Robert Wells
    Replies:
    4
    Views:
    659
    Default User
    Jun 24, 2008
  5. Qu0ll
    Replies:
    42
    Views:
    1,237
    Thufir Hawat
    Apr 13, 2009
Loading...

Share This Page