2 Replies Latest reply on Apr 28, 2009 11:29 PM by Antonello none

    Maximum XMX value on 32bit Windows Machine

    Antonello none Newbie

      I'have some problems while setting the XMX JM value bigger than 1300m.

      When i set 1400 or 1500m the error returned by the run.sh is:
      Error occurred during initialization of VM
      Could not reserve enough space for object heap
      Could not create the Java virtual machine.

      The o.s. is Windows Server 2003 32bit with this memory usage

      Total Physical Memory 16,383.08 MB
      Available Physical Memory 10.37 GB
      Total Virtual Memory 23.41 GB
      Available Virtual Memory 13.21 GB

      the server has more than 10GB of free physical memory. Searching google i found that the problem maybe is a limit in the address space on the 32bit version of Windows Server 2003. Is really possibile that i can't start JV istance with an XMX value bigger than 1300m?

      I have not experience with JBoss@Windows 32, any suggestion appreciated

      Thanks in advance

        • 1. Re: Maximum XMX value on 32bit Windows Machine
          Peter Johnson Master

          On a 32-bit system each process is limited to 4GB of address space. 2GB of that is used by the OS (handles and other data used by the OS to service your app), Some of the low memory is occupied by stuff that dates back to MS-DOS. Much of the memory area just below the 2GB mark is occupied by system DLLs (even the JVM DLLs are compiled to load just below that area). The java.exe code loads just above the MS-DOS area. This leaves the memory between the java.exe code and the JVM DLLs available to run the Java app. The JVM reserves some room for the thread stacks.

          Given that, the largest heap space I have been able to use is around 1.7GB (the exact number changes with the exact level of the OS and service packs and at time with patches).

          You set the permgen to 512MB - this reduced the available space for your heap by that amount, so a 1.3GB max for you sounds about right.

          • 2. Re: Maximum XMX value on 32bit Windows Machine
            Antonello none Newbie

            Thank you again Peter,
            always fast and accurate.