Variable maximum heap sizes on Windows ?!?!?

We run under 1.4.2 and often have to bump the memory settings up for large computations. We've found that depending on the machine, the maximum value for the -Xmx setting can vary significantly. On some machines, we can go as high at 1.4GB, on others only up to 850MB. The 850MB maximum was on a machine with 2GB of RAM running XPsp2.
What factors could be fragmenting the memory space of the VM such that it can't get a large contiguous allocation?

In a previous article there was a good link to memory limitations of windows. See http://www.unixville.com/~moazam/ I did a search on the internet using google http://www.google.com/search?q=memory+dll+view and the first link google provides is a free process viewer you use to see where dll are loaded in memory for a particular exe. http://www.xmlsp.com/pview/prcview.htm I downloaded and tried that program. You can right click on the java.exe and select Modules or Memory and it will give you list of all the loaded dll's and where they are located in memory. You can then see if it is a dll that is loaded in the middle of memory that is breaking up the contiguous memory. You may also want to run it on the different boxes to see if the dll are loaded differently on the individual boxes.
There are probably even better process viewers that could graphically show you the memory the modules are taken up, but I will allow you to do the further research.

Similar Messages

  • The initial heap size must be less than or equal to the maximum heap size.

    All,
    Please help!!
    I have tested my Application Client Project in WSAD on my pc and it works fine.
    I have 1gb RAM on my pc. When I deploy the same app on another xp pc(same as mine but 512mb RAM) I get a heap size error. Here is the exact error:
    Incompatible initial and maximum heap sizes specified:
    initial size: 268435456 bytes, maximum heap size: 267380736 bytes
    The initial heap size must be less than or equal to the maximum heap size.
    The default initial and maximum heap sizes are 4194304 and 267380736 bytes.
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    Could not create the Java virtual machine.
    Press any key to continue . . .
    Here is the batch file that runs my app:
    @echo off
    SET appClientEar=C:\corp\apps\mts\jars\MTSClientEAR.ear
    set JVM_ARGS=-Xms256M -Xmx256M
    set CLIENT_PROPS=C:\corp\apps\mts\jars\medicalclient.properties
    set APP_ARGS=
    call C:\bnsf\IBM\WebSphere\AppClient\bin\launchClientBNSF.bat "%JVM_ARGS%" %appClientEar% "-CCpropfile=%CLIENT_PROPS%" %APP_ARGS%
    @pause
    I have changed the value of Xms and Xmx of JVM_ARGS to different size but I sitll get error. Anyone knows what the problem is. Thanks..

    Don't know why, but the "maximum heap size: 267380736 bytes" value is just slightly less than 256*1024*1024, wheras the reported initial size is equal to that.
    Try setting the initial value to 255MB.

  • Maximum heap size for 64bit JVM

    Hi,
    I am trying to set the maximum heap size for a java process in a 64bit JVM . I am not able to set more then 3G
    command line config:
    java -Xms64m -Xmx3g -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8000 com.superpages.puboptions.CampaignFeedStarter >> publisher.out 2>&1 &
    Hardware / software configs
    *$uname -a*
    SunOS labsbear 5.9 Generic_122300-19 sun4u sparc SUNW,Sun-Fire-V440
    *16GB total physical memory*
    *4 processor machine*
    *64 bit JVM*
    JDK1.6
    where is this limitation coming from. How to set the heap size to 6g.
    Thanks for your time
    Meena

    You need to use the -d64 switch to request the 64-bit JVM. E.g.,$ java -showversion -Xmx6g HelloWorld
    Invalid maximum heap size: -Xmx6g
    The specified size exceeds the maximum representable size.
    Could not create the Java virtual machine.
    $ java -showversion -d64 -Xmx6g HelloWorld
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
    Hello world!

  • Maximum heap size of JVM

    hi,
    I need to set the maximum heap size of the JVM. I know that I can do
    it for a single run by saying:
    java -Xmx75M example.class
    But how do I make the JVM use this maximum heap size for all its
    runs, without specifying '-Xmx75M' in every run.
    I need this because I am using my system as a server for JSP web
    site. For that site if a very simple query is given such as 'a' in title, as many as 6000
    records as retrieved from my Filemaker Databases and the java
    ResultSet object is not able to handle those records. The system is
    then throwing an exception and error message 'Host not found' is
    sent back to the client's browser. As far as I know, Filemaker does
    not support 'LIMIT' keyword in queries.
    So please tell me how can I rectify that problem.
    Thanks in advance,
    niranjan maturi

    hi,
    I tried setting TOMCAT_OPTS. The maximum I could go in my system is 1300M
    i.e. set TOMCAT_OPTS="-DXmx=1300m".
    Still I am having the problem that when some 5000 records are fetched from the database, the ResultSet object is not able to handle them. It is able to handle upto 2000 records. I am using windows2000, jdk1.3.2 and Filemaker Pro 5.0 databases.
    I tried to set the maximum number of records that can be retrieved to 2000 so that the problem will be solved. But I am not able to set that as well. I did:
    Class.forName("com.fmi.jdbc.JdbcDriver").newInstance();
    Connection con = DriverManager.getConnection("standard statement");
    PreparedStatement pstmt = con.prepareStatement("select id, pubyear, Checkedoutby, >>callnumber from mprrc_materials");
    pstmt.setFetchSize(2000);
    ResultSet rs3 = pstmt.executeQuery();Its giving the error:
    java.lang.AbstractMethodError at that setFetchSize() statement.
    I guess the JDBC driver provided by Filemaker Pro does not support that. So what can be done to solve the problem.
    Thanks,
    Niranjan Maturi

  • "Incompatiable initial and maximum heap sizes specified" error

    Hi,
    Using the command below:
    java -jar -Xms128m myjar.jar
    I get the following errors:
    "Error occurred during initialization of VM"
    "Incompatiable initial and maximum heap sizes specified"
    but if I take off the initial heap size parameter, just run:
    java -jar myjar.jar
    it works fine apart from that the heap size is not desired.
    Can anyone please tell me what's the cause of the problem here? I'm suspecting the JVM has been configured to restrict manual adjustment of heap sizes...
    Many thanks.

    Hi,
    Using the command below:
    java -jar -Xms128m myjar.jar
    I get the following errors:
    "Error occurred during initialization of VM"
    "Incompatiable initial and maximum heap sizes
    specified"
    but if I take off the initial heap size parameter,
    just run:
    java -jar myjar.jar
    it works fine apart from that the heap size is not
    desired.
    Can anyone please tell me what's the cause of the
    problem here? I'm suspecting the JVM has been
    configured to restrict manual adjustment of heap
    sizes...
    Many thanks.It turns out that I need to also specify the maximum heap size as well. Thanks.

  • Incompatible initial and maximum heap sizes specified

    At first my program was crashing, saying;
    java.lang.OutOfMemoryError: Java heap space
    So I added this vm argument: -Xms128M
    Now, i get this message:
    Incompatible initial and maximum heap sizes specified
    What do I do?

    At first my program was crashing, saying;
    java.lang.OutOfMemoryError: Java heap space
    So I added this vm argument: -Xms128M
    Now, i get this message:
    Incompatible initial and maximum heap sizes
    specified
    What do I do?Specify a maximum heap size (-Xmx) as well (and make that be greater than or equal to the minimum size).

  • Upto how much I can set maximum Heap size for jvm?

    I am running application on 8GB RAM Windows 64 bits machine.
    I am running out of OutOfMemory (Heap Space). I want to increase the Heap Size for my jvm.
    But can anybody please tell me what is the limit by which I can set the maximum size for heap?
    Thanks in Advance,
    Jenish

    Max allowed memory per process is 2 raised to the 64th power. What maximum memory you can set depends on the memory available
    for your application. You may be able to set more than 8GB ram then it will use the swap space and it will slow down your application
    performance. So try different memory size and see which one works best for your application.

  • How to set the maximum heap size on a deployed application?

    I�m running a fairly large java application and am getting java.lang.OutOfMemoryError. I could increase the heap size in my development environment to eliminate this error. However, I don�t know how to set this in a deployed application. We are currently using ant to build our software.
    Another question, when I execute a statement such as java �Xmx512M �cp app.jar. Is it correct to say that the application in app.jar will use to a maximum of 512MB of memory when running?
    Thank you everyone for your help!

    But first, when you say "a deployed environment" do you mean an executable .jar file? This is what I'm using.The term "deploy" is commonly used to refer to deploying an ear file or a war file on an application server.
    I would assume that there is some entry you can include in the .jar's
    Manifest.mf file to specify the maximum memory, but I can't find an example of the entry. <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6197671"></a>

  • Maximum Heap Size in Java 5

    When migrating an application from JDK1.4.2_12 to JDK1.5.0_10,it was seen that the max. heap size that was set using -Xmx had to be reduced from 1.5 GB to 1.3 GB on a win32 machine inorder to create JVM successfully. Any pointers to what in Java 5.0 could have brought about this change is highly appreciated.
    (Please note that I understand how heap size allocation works w.r.t virtual memory on win32.)

    Because the VM foot print got bigger of course.
    That has happened with every version of the Sun VM.

  • Large JVM heap sizes under windows xp?

    I have a windows XP Pro SP1 box with 2 GB of physical RAM. I am using the latest jdk, 1.4.2_05.
    I understand that 32 bit windows by default allows 2 GB address space for each application, permanently reserving 2 GB for the OS. (There are also apparently special builds going back to win2k which have a special mode where applications can address 3 GB and the OS addresses 1 GB; if anyone knows how to turn this mode on under win xp please let me know.)
    So, I should be able to allocate ~2 GB to the JVM (the number is slightly less than 2 GB due to overhead associated with each process in windows) using something like
         -Xms1900m -Xmx1900m
    as command line args to the java command.
    But when I try the above it crashes with the error
         Error occurred during initialization of VM
         Could not reserve enough space for object heap
    Experimentally, I found that the maximum value which works on my box is
         -Xms1200m -Xmx1200m
    which seems way smaller than it ought to be.
    Doing a forum search, I found others who report similar issues, e.g.
         http://forum.java.sun.com/thread.jsp?forum=136&thread=522506
    But I did not find a decent solution or up to date discusssion.
    Does anyone know with windows xp pro what the jvm memory limit is?
    As part of my sun search, I came across the following old (circa 2000) but interesting bug report:
         http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4358809
    I have never heard of the rebase program before. Is it built into windows? Is it safe to use? Anyone ever try the command as described there?

    In addition to this forum posting, I got in email communication with Peter Kessler, the technical lead for the garbage collector in the HotSpot(TM) virtual machine). Below are snippets from some of his emails to me.
    #1:
    I haven't tried pushing Windohs XP to see how big I could get the
    heap. I'm pretty sure you don't want to get try to get it to 1.9GB,
    since that wouldn't leave much room for DLL's, JVM data structures
    outside the heap, thread stacks, I/O buffers, etc.
    I don't know what the library C:\WINDOWS\System32\LPK.DLL is, or if
    you could successfully rebase it closer to 0x76000000. The issue
    with rebasing DLL's is that people have sometimes given thought to
    where they should be, given other libraries they are typically used
    with. (If a DLL can't be loaded at its default base address, it
    gets relocated dynamically. That slows down program startup; and
    often means that the library can't be shared with other applications
    running on the same machine, increasing your need for swap file
    space.)
    It does seem weird that we would make the default base for jvm.dll
    be 0x08000000, but the base of hpi.dll at 0x10000000. [See email #3 below]
    The jvm.dll isn't going to get that much larger any time soon. I'll ask around
    about that one. (The library bases for JDK-1.4.2 are different
    from those reported in bug id 4358809 for because we periodically
    reconsider where to base the libraries, given the other libraries
    on a particular release of Windohs.)
    So, I don't have any great advice on how to squeeze another 400MB of
    heap out of your machine. I suppose it's fruitless to ask if you
    could squeeze 400MB of data structures out of your application?
    Have you run an allocation profiler on it?
    Since you are willing to switch operating systems, you can download
    a copy of Solaris 10 for x86 platforms (for free) from
    http://wwws.sun.com/software/solaris/10/
    I just tried a Solaris 10 x86 box, and could get a -Xmx2900m jvm to
    start. But without your application it's hard to know if it would
    run well with that size heap (e.g., if it would have room for thread
    stacks, file buffers, etc.), so your milage may vary, but 2.9GB is
    larger than you say you need. There are lots of other benefits of
    running Solaris. I don't know about making you a poster child, but
    I could ask about that, too.
    #2:
    I'm told that some of the popular distibutions of Linux ship with
    a "4GB" kernel, which allows one to get 3GB (2.4 kernels?) or almost
    4GB (2.6 kernels?) of address space for user processes. I haven't
    used those kernels myself. Among the reasons the 4GB kernel isn't
    the standard kernel is that some user programs are surprised (in a
    bad way) by finding their code or data in the "negative" part of
    the address space, or crossing the "sign-bit" boundary. (Of course,
    all addressing arithmetic should be done as unsigned quantities!)
    Our Java virtual machine shouldn't have those problems, so that
    kernel might work for you.
    #3:
    Ah. It looks like in JDK-1.4.2 (and earlier) we forgot to
    explicitly set the base for hpi.dll, so it got the default
    base of 0x10000000. (Don't we love learning these details
    about Windohs?) As I said, we periodically reconsider the
    bases for the libraries. We seem to have done that, more
    thoroughly, for JDK-1.5.0:
    Base Size Version Path
    0x00400000 0xc000 1.05.0000.0000 C:\pbk\deployed\JDK-1.5.0\bin\java.EXE
    0x77f80000 0x7d000 5.00.2195.6899 C:\WINNT\system32\ntdll.dll
    0x7c2d0000 0x62000 5.00.2195.6876 C:\WINNT\system32\ADVAPI32.dll
    0x7c570000 0xb8000 5.00.2195.6897 C:\WINNT\system32\KERNEL32.DLL
    0x77d30000 0x71000 5.00.2195.6904 C:\WINNT\system32\RPCRT4.DLL
    0x78000000 0x45000 6.01.9844.0000 C:\WINNT\system32\MSVCRT.dll
    0x6d6b0000 0x185000 1.05.0000.0000 C:\pbk\deployed\JDK-1.5.0\jre\bin\client\jvm.dll
    0x77e10000 0x65000 5.00.2195.6897 C:\WINNT\system32\USER32.dll
    0x77f40000 0x3e000 5.00.2195.6898 C:\WINNT\system32\GDI32.DLL
    0x77570000 0x30000 5.00.2161.0001 C:\WINNT\system32\WINMM.dll
    0x6d2f0000 0x8000 1.05.0000.0000 C:\pbk\deployed\JDK-1.5.0\jre\bin\hpi.dll
    0x690a0000 0xb000 5.00.2134.0001 C:\WINNT\system32\PSAPI.DLL
    0x6d680000 0xc000 1.05.0000.0000 C:\pbk\deployed\JDK-1.5.0\jre\bin\verify.dll
    0x6d370000 0x1d000 1.05.0000.0000 C:\pbk\deployed\JDK-1.5.0\jre\bin\java.dll
    0x6d6a0000 0xf000 1.05.0000.0000 C:\pbk\deployed\JDK-1.5.0\jre\bin\zip.dll
    You might want to try the "release candidate" (i.e., what we
    hope will be the final bits) of JDK-1.5.0 from
    http://java.sun.com/j2se/1.5.0/download.jsp
    and see if it helps.

  • Maximum LUN size for Windows 2012 server

    Dear All
                    What is the Maximum size of the LUN that can be provided to windows 2012 server. Earlier it was 2 TB for windows 2008 server has the policy changed or it is still
    the same.
    Regards
    Zubair

    Hi,
    Would you please let me know if your OS version is Windows Server 2012 or Windows Server 2012 Essentials? If it’s Windows Server 2012, you’d better ask the question in the File Services and
    Storage forum. We will get a better assistance there.
    File Services and Storage
    http://social.technet.microsoft.com/Forums/en-US/winserverfiles/threads
    Best Regards,
    Andy Qi
    Andy Qi
    TechNet Community Support

  • What is the maximum partition size for windows on 128GB MBA?

    I want to use Windows 7 as my primary OS on my 128GB MBA. How big can I make my windows partition? Is there anything special I need to do?

    You have two options.
    1. Put OSX on an external drive - OS X: Installing OS X on an external volume - Apple Support and make your internal disk to be fully Windows.
    2. Use minimal OSX size between 16-32G, and the remainder for Windows.

  • 32Bit Eclipse, 32Bit JRockit, 64Bit Windows OS - Maximum  Heap Space.

    Hi:
    My 32Bit Eclipse application tends to run out of heap space on big files. I have been using Sun JRE 6. JVM.
    Using the Sun JRE 6 JVM the maximum heap size I can achieve is 1.3GB
    My machine has 8GB of physical memory.
    I'm wondering if there is any advantage in moving to JRockit.
    1. Willl the 32Bit JRocket JVM enable me to have more heap space on 64Bit Windows XP.
    2. If (1) is possible what are some aggressive settings I can use to maxmiise heap space.
    Thanks
    Mark

    We run 2.75 GB ( -jrockit -Xms2816m -Xmx2816m ) in production all the time with 32-bit JRockit on Windows 2003 Server 64-bit. I had hoped to get it to 3.25 GB, but we occasionally run out of native memory and have to back down the heap size to 2.75 GB. I look into it when I get more time. Remember to set your min and max memory equal.
    The max your process can consume is 4GB (max addressable memory with 32-bits), so your JVM memory + Heap memory can't go over 4GB. If you use JRockit Mission Control, you can connect to the JVM and monitor the size of your virtual address space (looking at Mem Usage in Windows Task Manager kind of works too). I'd start with these JVM args:
    +(all args should be on one line)+
    -jrockit -Xms2816m -Xmx2816m
    -Xmanagement:ssl=false,authenticate=false,port=7091
    Connect to it with the jrmc.exe program in your JRockit bin directory and you can get a pretty good idea what is happening in the JVM. Also, if you haven't already, download the latest JRockit (google: JRockit download).
    Hope that gets you started so you can check out JRockit...
    -Bill S.
    (a fan of JRockit)

  • Heap Size in 64 bit operating systems

    Hi,
    I have written a Java application which needs huge size heap. I tried to run the application under 32 bit windows operating system, but with 32 bit OS I got maximum heap size of 1.5 GB. To get more heap I have installed Windows 2003 Standard edition 64 bit version. Also I have installed JDK 1.7 64 bit for windows. I am using Netbeans IDE 6.7. I have configured Netbeans for 64 bit JVM. With this configuration I tried to set heap size of 1.6 GB it gives error "Could not create Java Virtual machine......". Also If I check proceess in task manager I see java.exe * 32 process. Does this mean JVM being used is still 32 bit JVM?
    Please let me know how to get more heap size under 64 bit OS?
    Regards,
    -Suresh Shirgave

    From a cmd window run a simple program using a 64-bit jvm (HelloWorld or similar) with different -Xmx values to establish the limit at which the program will run.
    <pathTo64-bitJVM>java -Xmxnn HelloWorldIf that's different from NB, then it's a setting of some kind in NB. Maybe you are pointing NB to a 32-bit JDK? Check the value in <NBInstallDirectory>\etc\netbeans.conf. If that's not it, check NB Help. You might want to ask the question at a NB forum, since this is a new version there may be a problem. Note that these forums are for Java language topics.

  • Max. heap size - possibility to set in jar file ?

    Hi everybody,
    my first question ;-)
    I used java webstart for a while to roll out my software to 2 other colleagues. There was a possibility to set the starting and maximum heap size via the jnlp file. Recently I switched my "deployment process" to a simple jar file. I looked through the jar docs and googled a bit until I found this in the [bug database|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4682105]
    and especially:
    When jar file is read the maximum heap size is already set.
    It is not feasible to introduce this feature.
    So the only way to do this is using a script ?
    Thanks in advance and enjoy your day,
    Michael

    Thanks for your quick and economic response.
    Another way would be to use a tool like Launch4j which builds an exe file. Until now I have not been a friend of exe files for java programs. Since my application is only used in Windows environment I will have to rethink this opinion.

Maybe you are looking for

  • ITunes account, purchases & family share with divorce

    My wife, daughter and I each have individual iCloud account but we have been using my account as the iTunes store account for purchasing content. I set up the new Family Sharing option with my account as the master account. What happens if I disconti

  • Upgrade from iPhoto 9.2.1 to iPhoto 9.4.2

    I currently have iPhoto 9.2.1 installed on my MacBook Pro 8,2 running Mountain Lion OS.  I have tried everything to upgrade to iPhoto 9.4.2 but on my update page on my App Store do not get any upgrade messages. I have downloaded the Apple Support .dm

  • Need the SSAS Prediction Date

    I have an SSAS BI project using SQL Server 2012 and Visual Studio 2012 (using the Sequence clustering algorithm) that is giving me some great predictions. I have several years of system failure data and it is predicting WHAT the next system failure i

  • Why does arrow show up on startup as if i downloaded something

    When i start firefox it kinda freezes for a second as if its downloading something, and a grey arrow goes to the download spot, but it doesnt flash green like this (normal download) http://prntscr.com/2sbl1u but rather it just stays grey like this ht

  • E2E Solution manager Diagnostic

    Hi, I want the model question for the E2E 100(End to End Solution Manager Diagnostic).  I need to apper in the certification. Can anybody provide me the model question for this certification or  need a guidence for the preparation............. very t