How does JVM calculate the committed heap memory?












5















Based on the documentation : https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html



committed - represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.



but the question is how JVM calculate the committed memory?










share|improve this question

























  • Closely related to stackoverflow.com/questions/41468670/…

    – Raedwald
    Nov 14 '18 at 9:40











  • The strategy heavily relies on the JVM and the GC versions. Different versions give different strategies.

    – Sofo Gial
    Nov 14 '18 at 9:41











  • Do you want to know how the JVM calculates the amount of memory that it requests from the OS or the amount that is currently comitted?

    – dpr
    Nov 14 '18 at 9:42











  • @dpr, i am aware that amount of committed memory may change over time (increase or decrease). I want to know the basis of increase/decrease of committed memory.

    – Andrew
    Nov 14 '18 at 10:27











  • @Andrew You can find some relevant info here: docs.oracle.com/javase/9/gctuning/…

    – Sofo Gial
    Nov 14 '18 at 11:54
















5















Based on the documentation : https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html



committed - represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.



but the question is how JVM calculate the committed memory?










share|improve this question

























  • Closely related to stackoverflow.com/questions/41468670/…

    – Raedwald
    Nov 14 '18 at 9:40











  • The strategy heavily relies on the JVM and the GC versions. Different versions give different strategies.

    – Sofo Gial
    Nov 14 '18 at 9:41











  • Do you want to know how the JVM calculates the amount of memory that it requests from the OS or the amount that is currently comitted?

    – dpr
    Nov 14 '18 at 9:42











  • @dpr, i am aware that amount of committed memory may change over time (increase or decrease). I want to know the basis of increase/decrease of committed memory.

    – Andrew
    Nov 14 '18 at 10:27











  • @Andrew You can find some relevant info here: docs.oracle.com/javase/9/gctuning/…

    – Sofo Gial
    Nov 14 '18 at 11:54














5












5








5


1






Based on the documentation : https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html



committed - represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.



but the question is how JVM calculate the committed memory?










share|improve this question
















Based on the documentation : https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html



committed - represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.



but the question is how JVM calculate the committed memory?







java heap-memory






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 9:12









Sofo Gial

442515




442515










asked Nov 14 '18 at 9:08









AndrewAndrew

55041025




55041025













  • Closely related to stackoverflow.com/questions/41468670/…

    – Raedwald
    Nov 14 '18 at 9:40











  • The strategy heavily relies on the JVM and the GC versions. Different versions give different strategies.

    – Sofo Gial
    Nov 14 '18 at 9:41











  • Do you want to know how the JVM calculates the amount of memory that it requests from the OS or the amount that is currently comitted?

    – dpr
    Nov 14 '18 at 9:42











  • @dpr, i am aware that amount of committed memory may change over time (increase or decrease). I want to know the basis of increase/decrease of committed memory.

    – Andrew
    Nov 14 '18 at 10:27











  • @Andrew You can find some relevant info here: docs.oracle.com/javase/9/gctuning/…

    – Sofo Gial
    Nov 14 '18 at 11:54



















  • Closely related to stackoverflow.com/questions/41468670/…

    – Raedwald
    Nov 14 '18 at 9:40











  • The strategy heavily relies on the JVM and the GC versions. Different versions give different strategies.

    – Sofo Gial
    Nov 14 '18 at 9:41











  • Do you want to know how the JVM calculates the amount of memory that it requests from the OS or the amount that is currently comitted?

    – dpr
    Nov 14 '18 at 9:42











  • @dpr, i am aware that amount of committed memory may change over time (increase or decrease). I want to know the basis of increase/decrease of committed memory.

    – Andrew
    Nov 14 '18 at 10:27











  • @Andrew You can find some relevant info here: docs.oracle.com/javase/9/gctuning/…

    – Sofo Gial
    Nov 14 '18 at 11:54

















Closely related to stackoverflow.com/questions/41468670/…

– Raedwald
Nov 14 '18 at 9:40





Closely related to stackoverflow.com/questions/41468670/…

– Raedwald
Nov 14 '18 at 9:40













The strategy heavily relies on the JVM and the GC versions. Different versions give different strategies.

– Sofo Gial
Nov 14 '18 at 9:41





The strategy heavily relies on the JVM and the GC versions. Different versions give different strategies.

– Sofo Gial
Nov 14 '18 at 9:41













Do you want to know how the JVM calculates the amount of memory that it requests from the OS or the amount that is currently comitted?

– dpr
Nov 14 '18 at 9:42





Do you want to know how the JVM calculates the amount of memory that it requests from the OS or the amount that is currently comitted?

– dpr
Nov 14 '18 at 9:42













@dpr, i am aware that amount of committed memory may change over time (increase or decrease). I want to know the basis of increase/decrease of committed memory.

– Andrew
Nov 14 '18 at 10:27





@dpr, i am aware that amount of committed memory may change over time (increase or decrease). I want to know the basis of increase/decrease of committed memory.

– Andrew
Nov 14 '18 at 10:27













@Andrew You can find some relevant info here: docs.oracle.com/javase/9/gctuning/…

– Sofo Gial
Nov 14 '18 at 11:54





@Andrew You can find some relevant info here: docs.oracle.com/javase/9/gctuning/…

– Sofo Gial
Nov 14 '18 at 11:54












1 Answer
1






active

oldest

votes


















1














Here you can find a little bit more detail, but it does not explain the exact way how committed heap space is increased:




There is also a committed heap size which acts as a "high water
mark", moving up once the JVM cannot free up space even on old
collection / young collection to make room. In this case, the
committed heap size is increased
. This cycle repeats until the
committed heap size matches the maximum heap size, the maximum space
allocatable.




https://support.mulesoft.com/s/article/Java-JVM-memory-allocation-pattern-explained






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53296481%2fhow-does-jvm-calculate-the-committed-heap-memory%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Here you can find a little bit more detail, but it does not explain the exact way how committed heap space is increased:




    There is also a committed heap size which acts as a "high water
    mark", moving up once the JVM cannot free up space even on old
    collection / young collection to make room. In this case, the
    committed heap size is increased
    . This cycle repeats until the
    committed heap size matches the maximum heap size, the maximum space
    allocatable.




    https://support.mulesoft.com/s/article/Java-JVM-memory-allocation-pattern-explained






    share|improve this answer




























      1














      Here you can find a little bit more detail, but it does not explain the exact way how committed heap space is increased:




      There is also a committed heap size which acts as a "high water
      mark", moving up once the JVM cannot free up space even on old
      collection / young collection to make room. In this case, the
      committed heap size is increased
      . This cycle repeats until the
      committed heap size matches the maximum heap size, the maximum space
      allocatable.




      https://support.mulesoft.com/s/article/Java-JVM-memory-allocation-pattern-explained






      share|improve this answer


























        1












        1








        1







        Here you can find a little bit more detail, but it does not explain the exact way how committed heap space is increased:




        There is also a committed heap size which acts as a "high water
        mark", moving up once the JVM cannot free up space even on old
        collection / young collection to make room. In this case, the
        committed heap size is increased
        . This cycle repeats until the
        committed heap size matches the maximum heap size, the maximum space
        allocatable.




        https://support.mulesoft.com/s/article/Java-JVM-memory-allocation-pattern-explained






        share|improve this answer













        Here you can find a little bit more detail, but it does not explain the exact way how committed heap space is increased:




        There is also a committed heap size which acts as a "high water
        mark", moving up once the JVM cannot free up space even on old
        collection / young collection to make room. In this case, the
        committed heap size is increased
        . This cycle repeats until the
        committed heap size matches the maximum heap size, the maximum space
        allocatable.




        https://support.mulesoft.com/s/article/Java-JVM-memory-allocation-pattern-explained







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 12:38









        josmafjosmaf

        738




        738
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53296481%2fhow-does-jvm-calculate-the-committed-heap-memory%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Danny Elfman

            Lugert, Oklahoma