Reply
New Contributor
Posts: 4
Registered: ‎04-10-2018

MemMaxM vs. MemHeapMaxM

  • MemHeapMaxM - Max heap memory size in MB
  • MemMaxM - Max memory size in MB

Looking in the JvmMetrics at both MemMaxM and MemHeapMaxM, they have the same exact values. So what's the deal with these two? Why are they the same exact value in if I only set -Xmx30000m?

 

Thanks in advance!

Shai

Posts: 508
Topics: 14
Kudos: 85
Solutions: 45
Registered: ‎09-02-2016

Re: MemMaxM vs. MemHeapMaxM

@shai

 

In your case MemMaxM = MemHeapMaxM. It is ok and it will not give any issue in most of the cases. 

 

But the best practice is, MemMaxM should be greater than MemHeapMaxM. May be MemHeapMaxM should be upto 80% of MemMaxM. MemHeapMaxM will dynamically allocate the resource from MemMaxM, so it should not be greater than MemMaxM

 

 

New Contributor
Posts: 4
Registered: ‎04-10-2018

Re: MemMaxM vs. MemHeapMaxM

Thanks for your prompt response! I do have a followup question, how do you define both of these? I'm assuming Xmx is the MemHeapMaxM but how do you set MemMaxM ?

Highlighted
Posts: 508
Topics: 14
Kudos: 85
Solutions: 45
Registered: ‎09-02-2016

Re: MemMaxM vs. MemHeapMaxM

@shai

 

I've written a small blog in the below link long back regarding memory, javaopt - heap, etc. It may help you

 

you can do a temporary or permanent setup.

For permanent - use either cloudera (or) directly update the <service>-site.xml file

For temporary - the below link will explain

 

https://community.cloudera.com/t5/Hadoop-101-Training-Quickstart/Map-and-Reduce-Error-Java-heap-spac...

Announcements