Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (11.4k points)

I am monitoring a spark executor JVM of a OutOfMemoryException. I used Jconsole to connect to executor JVM. Following is the snapshot of Jconsole: enter image description here

In the image used memory is shown as 3.8G and committed memory is 8.6G and Max memory is also 8.6G Could anyone explain the difference between Used and Committed Memory or any link which explains it.

2 Answers

0 votes
by (32.3k points)

Used memory(jvm.memory.used): It is the current amount of memory in use.

Unit: Bytes

Committed memory(jvm.memory.committed): It is the amount of memory that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory can easily change over time. The Java virtual machine may release memory to the system and committed memory could be less than initial memory. Committed memory will always be greater than or equal to the used memory.

Unit: Bytes

Max memory(jvm.memory.max): It is stated as the maximum amount of memory that can be used for memory management. You may observe that many a times its value is undefined. The maximum amount of memory may change over time if defined. In every case where max memory is defined, the amount of used and committed memory will always be less than or equal to max.

Unit: Bytes


 

MEMORY POOL(figure):

        +----------------------------------------------+

        +////////////////           | +

        +////////////////           | +

        +----------------------------------------------+

        |--------|

           init

        |---------------|

               used

        |---------------------------|

                  committed

        |----------------------------------------------|

                            max

If you want to learn more about Big Data, visit Big Data Tutorial and Big Data Certification by Intellipaat.

0 votes
by (1.2k points)

The first and foremost understanding that we need here is that which is more prioritised. The order for the same goes like used < committed < max and all of them are measured in bytes.

These all are divided into multiple segments: 

  1. init : This is the initial amount of memory that is requested by JVM to the operating system at the initial startup

  2. used: this is the memory that is actually consumed, considering the memory being taken up of the variables and objects, even considering those which are not being used.

  3. committed: this is the amount of memory that is reserved at the operation system level for JVM, if in case JVM needs more then this part of memory can be used to fulfil that requirement. This may lead to memory overflow issues as well

  4. max: This is the max amount of memory that a JVM can request or can be allocated from the operating system.

Hence, with respect to the given example:

Used memory is 3.8G and committed & max memory is 8.6G, meaning we can allocate objects till 8.6G and that’s a surety. 

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...