Why are -Xms and -Xmx limits so small?

On a Win XP machine with 3GB of installed memory, the limits for -Xms and -Xmx are 1GB. My knapsack program works for small inputs (< 20 objects). But for real world problems it crashes immediately with an out-of-memory error. What possible harm could it do to allow a Java user to increase -Xms and -Xmx to 2 or 3 GB, or even larger? I would not care if it thrashed, if it finally came up with a good answer.

CHE22 wrote:
CHE22 wrote:
On a Win XP machine with 3GB of installed memory, the limits for -Xms and -Xmx are 1GB.
tschodt wrote:
How did you arrive at that?
By reading this:
http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf.
I guess you are referring to
Automatic Selection of Collector, Heap Sizes, and Virtual Machine
A server-class machine is defined to be one with
• 2 or more physical processors and
• 2 or more gigabytes of physical memory
13 Ergonomics - Automatic Selections and Behavior Tuning Sun Microsystems, Inc.
This definition of a server-class machine applies to all platforms, with the exception of 32-bit platforms running a version of the Windows operating system.
On machines that are not server-class machines, the default values for JVM, garbage collector, and heap sizes are
• the client JVM
• the serial garbage collector
• Initial heap size of 4MB
• Maximum heap size of 64MB
On a server-class machine, the JVM is always the server JVM unless you explicitly specify the -client
command line option to request the client JVM. On a server-class machine running the server JVM, the default
garbage collector is the parallel collector. Otherwise, the default is the serial collector.
On a server-class machine running either JVM (client or server) with the parallel garbage collector, the default initial and maximum heap sizes are
• Initial heap size of 1/64th of the physical memory, up to 1GB. (Note that the minimum initial heap size is 32MB, since a server-class machine is defined to have at least 2GB of memory and 1/64th of 2GB is 32MB.)
• Maximum heap size of 1/4th of the physical memory, up to 1GB.
Otherwise, the same default sizes as for non-server-class machines are used (4MB initial heap size and 64MB maximum heap size). Default values can always be overridden by command line options. Relevant options are shown in Section 8.And you missed that it said default.
And by adding any small integer to 1 in -Xms1G.Show us exactly what you specified, do you realize that-Xms11Gmeans 11 GB, much larger than 32-bit Windows can handle.

Similar Messages

  • Xms and Xmx parameters

    Hi, on a windows machine with jdk1.3 I start oracle's oc4j(standalone) from commandline. I specify Xms and Xmx parameters. Hence;
    java -Xms512M -Xmx512M -jar oc4j.jar
    is the command line command.
    But after I start the app server, when I look at the Window's task manager the java. exe has about 50M memory usage. Is there something wrong???
    Thanks all.

    The best option is to set it in setDomain.cmd/sh OR comEnv.cmd/sh depending on your WLS version, since even if you are starting your manage servers from commandline rather than using nodemanager, it will internally use this to set the environment.
    However if you are using nodemanager, you might try "server start" tab for passing JVM arguments.
    For windows service try the following link:
    http://e-docs.bea.com/wls/docs103/server_start/winservice.html#wp1186212 ----> its for WLS10.3

  • Proper use of JVM XMs and XMx settings

    I've configured Tomcat to run with -XMs1024m -XMx1024m, and am interested to know GC performs when the -XMs and XMx are the same value.
    Would it generally be better to have a lower -xms value?

    The -XMs only tells the VM how much memory to initially allocate, and doesn't have any correlation with normal operation of GC. I've used -XMs in the past when I know my memory requirements are pretty large, and that way will keep the VM from continuing to dynamically allocate more and more memory up to the XMx setting.

  • Hypertext links are not always preserved from Word to PDF, using Aperçu or Adobe, depending on OS 10 or Lion. Why? This generally works perfectly in Windows. Why are Apple and Adobe unable to correctly handle links when converting from Word to PDF?

    Hypertext links are not always preserved from Word to PDF, using Aperçu or Adobe, depending on OS 10 or Lion. Why? This generally works perfectly in Windows. Why are Apple and Adobe unable to correctly handle links when converting from Word to PDF?
    Depending on the system version, and Office Word version:
    - a pure URL link starting with http or even www sometimes works in PDF, either produced by Aperçu or Adobe, sometimes does not work;
    - other kind of links where the text under display is not a URL, never work!
    I like everything with Apple computers and software, except PDF generation. Output files are usually bigger in size, and no better quality, than under Windows. Furthermore, it is weird that something as common as hyperlinks does not work correctly!
    I related this question with Mac OS X Snow Leopard, but the problem is still there with Mac OS Lion.
    This problem seems to have been around for years, without any proper solution from Apple and/or Adobe! To me, this is very embarrassing!

    Greetings NoNameGiven,
    If I understand the problem correctly (I’m not sure I do) you would prefer ‘iii’ to be read as “eye eye eye” rather than “three”? The alt text property is the only way that I know of to make this happen. Hope this helps.
    a ‘C’ student

  • How can I set VM parameters except Xms and Xmx?

    I can set the Xms and Xmx as the following:
    <j2se version="1.4+" initial-heap-size="80m" max-heap-size="80m"/>
    but how can I set other VM parameter such as Xmn,XX:SurvivorRatio,and some which to special JVM(for example:JRockit)?

    There is a whole list ov vm-args considered "safe" by java web start listed in the developers guide at:
    http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#resources
    these can be set with the new arg to the j2se element, vm-args like this:
    <j2se version="1.5.0+" java-vm-args="-esa -Xnoclassgc"/>
    /Andy

  • JVM Java heap space Error || even with -Xms- and -Xmx commands

    hi all, i got a problem by allocating a very great boolean array.
    first of all, here is my testcode:
    public static void main(String[] args) {
              boolean[] testfield = new boolean[70000000];          
              while(true){
              //NOP     
         }as you see, i try to allocate an array with 70.000.000 boolean values - as 1 boolean may be represented as at least one physical bit we calculate the total amount of needed RAM-Space:
    70.000.000 bit / 8 = 8750000 byte
    8.750.000 byte = 8.75 MByte
    My System ist WinVista Ultimate 64-bit running on a Quadcore T2200 with 2GB-DDR3 RAM
    Looking in my Vista Ressourcemanager shows, that eclipse.exe reserves about 1.023 Mbyte....
    As IDE I use eclipse
    my eclipse.ini looks as follows:
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256M
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms512m
    -Xmx1024m
    -XX:PermSize=512mby using following VMCommand "-XX:+PrintGCDetails" and running the above code the output displays:
    [GC [DefNew: 180K->63K(960K), 0.0008311 secs][Tenured: 43K->107K(4096K), 0.0060371 secs] 180K->107K(5056K), 0.0069249 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
    [Full GC [Tenured: 107K->105K(60544K), 0.0044835 secs] 107K->105K(61504K), [Perm : 17K->16K(12288K)], 0.0045553 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
         at termain.main(termain.java:15)
    Heap
    def new generation   total 4544K, used 163K [0x246a0000, 0x24b80000, 0x24b80000)
      eden space 4096K,   4% used [0x246a0000, 0x246c8fe0, 0x24aa0000)
      from space 448K,   0% used [0x24aa0000, 0x24aa0000, 0x24b10000)
      to   space 448K,   0% used [0x24b10000, 0x24b10000, 0x24b80000)
    tenured generation   total 60544K, used 105K [0x24b80000, 0x286a0000, 0x286a0000)
       the space 60544K,   0% used [0x24b80000, 0x24b9a420, 0x24b9a600, 0x286a0000)
    compacting perm gen  total 12288K, used 16K [0x286a0000, 0x292a0000, 0x2c6a0000)
       the space 12288K,   0% used [0x286a0000, 0x286a41c0, 0x286a4200, 0x292a0000)
        ro space 8192K,  62% used [0x2c6a0000, 0x2cba2ba0, 0x2cba2c00, 0x2cea0000)
        rw space 12288K,  52% used [0x2cea0000, 0x2d4e88e0, 0x2d4e8a00, 0x2daa0000)so can anyone tell me please, how i manage to allocate bigger arrays? or where at least is the problem?
    Originally i was thinking like that way: Integer.MAXVALUE = (2^32)-1
    => biggest index an array can have
    => biggest allocation possible with ints weights (((2^32)-^1)/8)/1000*1000 = (round) 537 MByte < 2GByte => everything fine .... but it seems like not :-(
    When i try to allocate 60.0000.000 it works fine....but that is far not enough :-&
    thank you very much for your helping answers!

    The Sun Java virtual machine stores booleans as bytes, not bits, so for an array of 70 million booleans you need 70 million bytes, plus 8 bytes for the object header, and 4 bytes for the array length.
    I suspect that your eclipse.ini controls the JVM running the Eclipse IDE, not the JVM running your application. Note that in the -XX:+PrintGCDetails output at the end, it shows you running out of memory with 4MB of young generation and 60MB of old generation. That's the default configuration, as if you hadn't specified -Xms and -Xmx.
    The array of 60 million booleans only requires 60 million bytes (plus overhead), which fits in the default old generation.
    I think you need to put the -Xms and -Xmx in the same place you put the -XX:+PrintGCDetails, since that does seem to display information about the JVM running your application, not the JVM running Eclipse.

  • Why are PS and SG asking me to choose between purchasing the product or a 30 day trial?

    I have the one-year Creative Cloud Subscription and I downloaded several apps like Photoshop, Premiere Pro, and SpeedGrade.
    However, when I start up Photoshop and SpeedGrade I had to choose between purchasing the product or register for a 30 day trial.
    Anybody who knows why?

    Thanks a lot! I will give it a try!
    Verstuurd vanaf mijn iPhone
    Op 3 sep. 2012 om 07:21 heeft "Arpit Kapoor" <[email protected]> het volgende geschreven:
    Re: Why are PS and SG asking me to choose between purchasing the product or a 30 day trial?
    created by Arpit Kapoor in Adobe Creative Cloud - View the full discussion
    This should help : http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4668611#4668611
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4668611#4668611. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe Creative Cloud by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Why are downloads and all library unlistenable?

    Why are all old downloads and new scramboed and unlistenable in library and itunes?

    not sure about podcasts. but at least audiobooks have to be .m4b format to be recognized as such.
    a very stupid solution would be... take the aac files (convert them, if they are not already), run the "make bookmarkable" script ( http://www.dougscripts.com/itunes/scripts/ss.php?sp=makebookmarkable ), delete from the music list but keep files and drag them back in audioboos.
    there HAS to be a better way. but at least it works.
    G5 2x2,3   Mac OS X (10.4.6)  

  • Why are Links and forms not working in mobile safari?

    Why do links and forms on the site I am designing not work in mobile safari? They work fine in desktop browsers.
    The controls change state when focused, so it's not that they're being blocked, they simply don't activate. Behavior tested and observed on iPad running iOS 6.1.2 and iPhone running iOS 7.0.2.
    Reference: http://gilli.co/test.html

    I had the same problem but I just found a solution. Siri mistakenly suggests to enable reminders (which you should), but the setting that enables all these, is under System Services (on the bottom of the page) -> Location Based Alerts. I had deactivated it alleviate battery problems and had forgotten about it. Hope this helps!

  • What do -Xms and -Xmx do?

    I know what they are supposed to do, but am unable to see any tangible results from setting them...

    On my machine they do exactly what they're supposed to...that is, to set the initial and max memory available for a program. I wrote two programs to test this :
      //this shows how much memory is available at start up
      public void main(String args[]) {
        System.out.println(Runtime.getRuntime().freeMemory());
      //this outputs how many KB memory the program sucked before crashing.
      public static void main(String args[]) throws Exception {
        Vector vec = new Vector();
        int i = 0;
        try {
          while (true) {
            vec.add(new byte[1024]);
            ++i;
        } finally {
          System.out.println(i);
        }When I run the first program w/o -x set, I get around 1.5 mb (1760896 bytes); when I invoke it with -Xms16m it returns 16 mb (16440960 bytes). The second program crashes at around 64mb (63633 to be exact). Invoking it with -Xmx16m crashes it at 16 mb, as expected (15813).
    Both -Xmx and -Xms are unsupported options...thus their effects are implementation-dependent. It's thus possible that your implementation doesn't support them. (I'm running this on Win2000 using Sun's JVM 1.4.1_01-b01.)
    The only other thought that occurs to me is that you're sending the wrong parameters...-Xms16 means you want to set the initial stack to 16 bytes, obviously something that would have little effect. -Xms16k would be 16kbytes, -Xms16m is in megabytes.

  • Web - 500 images max? Why are the flash templates limited to 500?

    Is there any reason for limiting the templates to 500? is there a work-around?
    Lorenzo

    > Because nobody should be subjected to
    > such a crazy large slideshow.
    LOL!
    On a more serious note, nobody should be subject to waiting while LR processes and uploads over 2000 images. Even on a fast machine that would take some serious time.
    I have to wonder if LR is the best application for such large numbers of images. I'd suspect there are better programs out there, ones that don't insist on re-rendering the images every time and re-uploading them all. Dreamweaver comes to mind as an obvious choice.
    Should you insist on using LR, possibly consider breaking the images up into galleries. The folks at Theturninggate have some templates that allow you to organize galleries. I haven't used them, so I don't know specifics, but they look like they do some really neat stuff, and they have some automation options to help make it easier.

  • Why are google and youtube inconsistent with encrypted transmission of pages?

    Typically I get the padlock icon when I am on a google or youtube page but sometimes -- particularly recently -- I get the exclamation point with the further message that "the connection to this website is not fully secure because it contains unencrypted elements (such as images)." However, invariably when I refresh the page the padlock icon instead of the exclamation point appears. I don't understand why this happens since nothing otherwise on the page appears to have changed, and yet the refresh switches it from the exclamation point to the padlock icon. I'd appreciate any insight that someone can offer.

    Some pages may have rotating ads to insecure pages, so you may get other links if you refresh the page.
    You can open the Web Console (Firefox/Tools > Web Developer) to check if there are (red) lines with [mixed]to see if that helps to identify the mixed content.

  • Why are Sound and Vibration Toolset examples missing?

    I have installed the November Developer Suite CDs, the full Sound and Vibration Toolset and appropriate NI-DSA/NI-DAQ drivers for my PCI-4552. Why aren't all the SVTXMPs found? Specifically, Engine Run-up and Transient Analysis examples are missing from Labview->Find Examples->Browse->Toolsets and Modules->Sound and Vibration.

    I think the examples are there, they've just been installed in a different path from the one the "Search Examples" app is looking for. Try:
    C:\Program Files\National Instruments\LabVIEW 6.1\examples\Sound and Vibration\Transients Analysis
    This should get you to the examples your looking for.
    Criag

  • Why are iLife and iWork apps not installed on my Mac?

    Recently purchased a used iMac late 2013 model and met the seller at the Apple Store to factory reset the mac. Well that was done succesfully but upon my return home and unboxing the iMac once i logged on and went to look for iMovie app it was nowhere to be found. I looked for the other apps from iLife and iWork and they were nowhere either. I tried the search tool and nothing came up and when I went to search for them in the app store thinking I just had to re-download them they were not FREE for me to install.
    Isn't iLife and iWorks included with every mac for free? CAn someone please help me get these if I am entitled to them for free or explain why I have to pay for them? TIA.
    -Freddy

    They are free for the initial owner and if he accepts them at the app store, then they are permanently tied to his Apple ID and password. Their licenses are not transferable - subsequent owners must purchase the apps if they want them. Here are some excerpts from the licensing agreement:
    B. If you obtained the Apple Software preinstalled by Apple on Apple-branded hardware, in order to use
    the Apple Software on more than one of the Apple-branded computers you own or control under the
    Usage Rules, you must log in to the Mac App Store and associate the Apple Software with your Mac
    App Store account. If you choose not to associate the preinstalled Apple Software with your Mac App
    Store account, you are permitted to install, use and run one (1) copy of the Apple Software on a single
    Apple-branded computer at any one time. Please also note that by choosing to associate the
    preinstalled Apple Software with your Mac App Store account, you will also associate any other Apple
    software applications that also came preinstalled by Apple on your Apple-branded hardware at the time
    of purchase (excluding OS X, Safari, and system applications and tools).
    and:
    Apple Software obtained from the Mac App Store is not transferable. If you sell your Apple-branded
    hardware to a third party, you must remove the Apple Software from the Apple-branded hardware before doing so.
    If the initial owner does NOT associate the software with his app store account (in other words, he does not accept / install them), then he may transfer his license rights to a subsequent buyer.

  • Why are Genius Mixes now limited to 25 tracks?

    I've owned my iPod Touch June 2010. I've got about 30 gigs of music on there, and until recently the Genius mixes never actually listed the songs that they contained, but it was great, it seemed like there were hundreds and it never played the same song twice.
    What happens now is I can see the list of songs that are in the genius mix, but there are only 25 of them
    I'd like the genius mixes like they were before, with lots of songs in them.
    I've not changed any settings (that I'm aware of).
    Any ideas why this may have changed?
    Thanks in advance,
    Phil
    Version: 4.2.1 (8C148)
    Model MC008NF
    Message was edited by: fatphil2001
    Message was edited by: fatphil2001

    Hi Saurabh,
    Thanks very much for your help.
    I thought this was related to me updating from iOS 4.1 to 4.3. In fact I've since gone back to 4.1 (due to problem with Last Skipped Date not working in 4.2 or 4.3), and now when I look at the song list (button top right) it shows the contents of the album from which each song is sourced, and I prefer it that way.
    Best regards,
    Phil
    Message was edited by: fatphil2001

Maybe you are looking for

  • How can I best improve the performance of my Mac Book Pro?

    I have a 1st generation MBP running OS X Tiger (that's right, 10.4.11) and it is really showing it's age, mostly when I'm switching back and forth between multiple programs and when I'm browsing online. It will get tremendously slow (sometimes I'll h

  • Query regarding creation of tables using AET

    Hi Experts, First of all is it advisable to create a assignment block (table view/ form view) using AET? We are going to implement an upgrade project from  CRM 5.0 to CRM 7.0. In CRM 5.0 there was a two custom tables which needs to implemented in CRM

  • Activation of Batch Characteristics in Material Master

    Dear Gurus In Material Master the character values are in grey mode and not allowing to select.can anyone suggest how to activate this. other characters are in Blue colour. Thnk in Advance MK

  • Relative Path and FileWriter

    I have the following code and it works fine when running standalone. I have to add that entries.xml and my Java file are in the same package. String filename = this.getClass().getResource(".").getPath() + "entries.xml"; FileWriter writer = new FileWr

  • Downloading all previously purchased iTunes

    I just purchased a new iMac which has iTunes 11 installed.   How can I download all the iTunes songs I have purchased since 2008?   Do I need to de-authorize my previous computers and authorize the new iMac?