Difference between JVM application memory footprint and OS memoryConfigure Tomcat to use a different temp directory for file uploadsreduce memory footprint of java virtual machinePeriodic unresponsiveness in tomcatWhat consumes memory in java process?Analysis on Memory ManagementPermGen error in Java, while memory usage seems lowCan the JVM(Oracle) run into an OutOfMemory error if the heap size is below the max?java program out of memory before reaching xmxJVM on Windows - paging and full GCsJVM heap is being swapped causing GC go haywire - Tomcat

If prion is a protein. Why is it not disassembled by the digestive system?

Was Unix ever a single-user OS?

Would glacier 'trees' be plausible?

Sed Usage to update GRUB file

Theorem won't go to multiple lines and is causing text to run off the page

Why is Arya visibly scared in the library in S8E3?

How to make a newline without autoindent

Identifying my late father's D&D stuff found in the attic

Is it cheaper to drop cargo than to land it?

In a Latex Table, how can I automatically resize cell heights to account for superscripts?

Unknowingly ran an infinite loop in terminal

How do I tell my manager that his code review comment is wrong?

How could a planet have most of its water in the atmosphere?

Why is `abs()` implemented differently?

Was there ever a Kickstart that took advantage of 68020+ instructions that would work on an A2000?

When and why did journal article titles become descriptive, rather than creatively allusive?

Should one double the thirds or the fifth in chords?

Junior developer struggles: how to communicate with management?

Would "lab meat" be able to feed a much larger global population

Can Ghost kill White Walkers or Wights?

Catholic vs Protestant Support for Nazism in Germany

What are the spoon bit of a spoon and fork bit of a fork called?

Returning the outputs of a nested structure

Pressure inside an infinite ocean?



Difference between JVM application memory footprint and OS memory


Configure Tomcat to use a different temp directory for file uploadsreduce memory footprint of java virtual machinePeriodic unresponsiveness in tomcatWhat consumes memory in java process?Analysis on Memory ManagementPermGen error in Java, while memory usage seems lowCan the JVM(Oracle) run into an OutOfMemory error if the heap size is below the max?java program out of memory before reaching xmxJVM on Windows - paging and full GCsJVM heap is being swapped causing GC go haywire - Tomcat






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I know this is a question already discussed, but I couldn't find a method to get peace of mind.



Basically we have a java web application that runs under a tomcat application server, specifically:



  • Java HotSpot(TM) 64-Bit Server VM; 1.8.0_112; 25.112-b15; mixed mode

  • Tomcat 7.0_Tomcat7.0.73

  • Windows Server 2012 R2 (6.3.9600)

Our application is becomind too much memory hungry, so we're starting to profile it; but I can't understand a simple difference I see between application memory consumption (heap/non-heap) and memory on the OS:



Yourkit profiler:



Heap and non heap memory usage



Here the memory is 4.1 Gb (Heap committed) plus 660 Mb (Non heap, so Metaspace, code cache, compressed class space), so 4.7 Gb total



Windows memory:



enter image description here



Here I see 6.266 Gb of memory actively used by the Tomcat process



How can I measure this 1.5 Gb difference?



Is it just for the Tomcat application itself? The JVM runtime? If so, how I can measure it?



Edit: this difference seems to grow over time after the application server (Tomcat) start; initially the sum of Heap/Non Heap is quite close to the memory used by the Tomcat process as recorded by the OS, then after hours/days in tends to grow.



Edit 2: our JAVA options in the Tomcat server



-Xms512m
-Xmx6144m
-Dlog=production
-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Djava.util.Arrays.useLegacyMergeSort=true
-Duser.country=IT
-Duser.language=it
-XX:+UseG1GC
-XX:+UseStringDeduplication


Thank you










share|improve this question
























  • What JVM settings are you using?

    – Joe
    Apr 8 at 12:32











  • I added them in the question, thanks.

    – frankieta
    Apr 23 at 9:59












  • some ideas/thoughs: looks to me like tomcat in windows reserves the "private" ~6GB already (your Xmx param), which is not, as you already guessed the amount of RAM the app itself needs. your 2nd edit smells like a memory leak. you might want to go and analyze your heap, depending on your setup this might be helpfull (or not) eclipse.org/mat another idea (though im not familiar with how windows does it) check the memory of your threads. as final guess you might want to log garbage collection explicit so you can check if you actually free something.

    – Dennis Nolte
    Apr 23 at 10:10


















0















I know this is a question already discussed, but I couldn't find a method to get peace of mind.



Basically we have a java web application that runs under a tomcat application server, specifically:



  • Java HotSpot(TM) 64-Bit Server VM; 1.8.0_112; 25.112-b15; mixed mode

  • Tomcat 7.0_Tomcat7.0.73

  • Windows Server 2012 R2 (6.3.9600)

Our application is becomind too much memory hungry, so we're starting to profile it; but I can't understand a simple difference I see between application memory consumption (heap/non-heap) and memory on the OS:



Yourkit profiler:



Heap and non heap memory usage



Here the memory is 4.1 Gb (Heap committed) plus 660 Mb (Non heap, so Metaspace, code cache, compressed class space), so 4.7 Gb total



Windows memory:



enter image description here



Here I see 6.266 Gb of memory actively used by the Tomcat process



How can I measure this 1.5 Gb difference?



Is it just for the Tomcat application itself? The JVM runtime? If so, how I can measure it?



Edit: this difference seems to grow over time after the application server (Tomcat) start; initially the sum of Heap/Non Heap is quite close to the memory used by the Tomcat process as recorded by the OS, then after hours/days in tends to grow.



Edit 2: our JAVA options in the Tomcat server



-Xms512m
-Xmx6144m
-Dlog=production
-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Djava.util.Arrays.useLegacyMergeSort=true
-Duser.country=IT
-Duser.language=it
-XX:+UseG1GC
-XX:+UseStringDeduplication


Thank you










share|improve this question
























  • What JVM settings are you using?

    – Joe
    Apr 8 at 12:32











  • I added them in the question, thanks.

    – frankieta
    Apr 23 at 9:59












  • some ideas/thoughs: looks to me like tomcat in windows reserves the "private" ~6GB already (your Xmx param), which is not, as you already guessed the amount of RAM the app itself needs. your 2nd edit smells like a memory leak. you might want to go and analyze your heap, depending on your setup this might be helpfull (or not) eclipse.org/mat another idea (though im not familiar with how windows does it) check the memory of your threads. as final guess you might want to log garbage collection explicit so you can check if you actually free something.

    – Dennis Nolte
    Apr 23 at 10:10














0












0








0








I know this is a question already discussed, but I couldn't find a method to get peace of mind.



Basically we have a java web application that runs under a tomcat application server, specifically:



  • Java HotSpot(TM) 64-Bit Server VM; 1.8.0_112; 25.112-b15; mixed mode

  • Tomcat 7.0_Tomcat7.0.73

  • Windows Server 2012 R2 (6.3.9600)

Our application is becomind too much memory hungry, so we're starting to profile it; but I can't understand a simple difference I see between application memory consumption (heap/non-heap) and memory on the OS:



Yourkit profiler:



Heap and non heap memory usage



Here the memory is 4.1 Gb (Heap committed) plus 660 Mb (Non heap, so Metaspace, code cache, compressed class space), so 4.7 Gb total



Windows memory:



enter image description here



Here I see 6.266 Gb of memory actively used by the Tomcat process



How can I measure this 1.5 Gb difference?



Is it just for the Tomcat application itself? The JVM runtime? If so, how I can measure it?



Edit: this difference seems to grow over time after the application server (Tomcat) start; initially the sum of Heap/Non Heap is quite close to the memory used by the Tomcat process as recorded by the OS, then after hours/days in tends to grow.



Edit 2: our JAVA options in the Tomcat server



-Xms512m
-Xmx6144m
-Dlog=production
-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Djava.util.Arrays.useLegacyMergeSort=true
-Duser.country=IT
-Duser.language=it
-XX:+UseG1GC
-XX:+UseStringDeduplication


Thank you










share|improve this question
















I know this is a question already discussed, but I couldn't find a method to get peace of mind.



Basically we have a java web application that runs under a tomcat application server, specifically:



  • Java HotSpot(TM) 64-Bit Server VM; 1.8.0_112; 25.112-b15; mixed mode

  • Tomcat 7.0_Tomcat7.0.73

  • Windows Server 2012 R2 (6.3.9600)

Our application is becomind too much memory hungry, so we're starting to profile it; but I can't understand a simple difference I see between application memory consumption (heap/non-heap) and memory on the OS:



Yourkit profiler:



Heap and non heap memory usage



Here the memory is 4.1 Gb (Heap committed) plus 660 Mb (Non heap, so Metaspace, code cache, compressed class space), so 4.7 Gb total



Windows memory:



enter image description here



Here I see 6.266 Gb of memory actively used by the Tomcat process



How can I measure this 1.5 Gb difference?



Is it just for the Tomcat application itself? The JVM runtime? If so, how I can measure it?



Edit: this difference seems to grow over time after the application server (Tomcat) start; initially the sum of Heap/Non Heap is quite close to the memory used by the Tomcat process as recorded by the OS, then after hours/days in tends to grow.



Edit 2: our JAVA options in the Tomcat server



-Xms512m
-Xmx6144m
-Dlog=production
-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Djava.util.Arrays.useLegacyMergeSort=true
-Duser.country=IT
-Duser.language=it
-XX:+UseG1GC
-XX:+UseStringDeduplication


Thank you







tomcat memory jvm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 23 at 10:00







frankieta

















asked Feb 28 at 10:59









frankietafrankieta

1014




1014












  • What JVM settings are you using?

    – Joe
    Apr 8 at 12:32











  • I added them in the question, thanks.

    – frankieta
    Apr 23 at 9:59












  • some ideas/thoughs: looks to me like tomcat in windows reserves the "private" ~6GB already (your Xmx param), which is not, as you already guessed the amount of RAM the app itself needs. your 2nd edit smells like a memory leak. you might want to go and analyze your heap, depending on your setup this might be helpfull (or not) eclipse.org/mat another idea (though im not familiar with how windows does it) check the memory of your threads. as final guess you might want to log garbage collection explicit so you can check if you actually free something.

    – Dennis Nolte
    Apr 23 at 10:10


















  • What JVM settings are you using?

    – Joe
    Apr 8 at 12:32











  • I added them in the question, thanks.

    – frankieta
    Apr 23 at 9:59












  • some ideas/thoughs: looks to me like tomcat in windows reserves the "private" ~6GB already (your Xmx param), which is not, as you already guessed the amount of RAM the app itself needs. your 2nd edit smells like a memory leak. you might want to go and analyze your heap, depending on your setup this might be helpfull (or not) eclipse.org/mat another idea (though im not familiar with how windows does it) check the memory of your threads. as final guess you might want to log garbage collection explicit so you can check if you actually free something.

    – Dennis Nolte
    Apr 23 at 10:10

















What JVM settings are you using?

– Joe
Apr 8 at 12:32





What JVM settings are you using?

– Joe
Apr 8 at 12:32













I added them in the question, thanks.

– frankieta
Apr 23 at 9:59






I added them in the question, thanks.

– frankieta
Apr 23 at 9:59














some ideas/thoughs: looks to me like tomcat in windows reserves the "private" ~6GB already (your Xmx param), which is not, as you already guessed the amount of RAM the app itself needs. your 2nd edit smells like a memory leak. you might want to go and analyze your heap, depending on your setup this might be helpfull (or not) eclipse.org/mat another idea (though im not familiar with how windows does it) check the memory of your threads. as final guess you might want to log garbage collection explicit so you can check if you actually free something.

– Dennis Nolte
Apr 23 at 10:10






some ideas/thoughs: looks to me like tomcat in windows reserves the "private" ~6GB already (your Xmx param), which is not, as you already guessed the amount of RAM the app itself needs. your 2nd edit smells like a memory leak. you might want to go and analyze your heap, depending on your setup this might be helpfull (or not) eclipse.org/mat another idea (though im not familiar with how windows does it) check the memory of your threads. as final guess you might want to log garbage collection explicit so you can check if you actually free something.

– Dennis Nolte
Apr 23 at 10:10











1 Answer
1






active

oldest

votes


















1














Java Allocated Heap and Windows Working Set are not the same thing exactly.



Your 1.5 GB difference is because of how memory gets addressed on Windows. To explain this, here are the facts that I think are most relevant:



  • 'xmx' is 6 GB

  • You are on Windows

  • "Limit" in your graph is 5.3 GB.

  • You only see this after the server has been running for days

On Windows, the JVM needs a continuous block of virtual memory for the heap. It will address 6 GB when the application starts, but only allocate physically whatever value you set for 'xms' initially. As your application runs, it will eventually allocate more memory for the heap up to 6 GB minus whatever you need for non-heap memory (e.g. Metaspace for Java 8+). The non heap memory should stay pretty much constant at 660 MB, and on top of that there might be some additional memory for the JVM itself (128 MB, I think?).



Your chart from the profile indicates that 4.1 GB is currently allocated, but there is a limit of 5.3 GB. I believe "limit" is the maximum amount of space available for the heap, and is supposed to be equivalent to the 'xmx' value minus metaspace. It is very possible for 100% of this limit value to be reported as committed to the operating system because of the requirement to have a contiguous block of memory for the Java heap.



5.3 GB + 660 MB = 5960+ MB (probably more depending on how the limit got rounded). If we guess that it actually adds up to your xmx value of 6144, then 128 MB for the JVM = 6272 MB, which is a tiny bit more than your 6266 MB that Windows says is private.



The only question that remains is... why has your JVM physically addressed the entire available heap, if 'xms' is set to 512 MB? The answer is because it thought it was going to need the entire heap to be physically addressed for some reason. It clearly doesn't at the time that you are profiling it, but that is a pretty big dip in your graph when it does Garbage Collection (like 1 GB released in one shot?) The standard answers to this are:



  • You might have a memory leak - that graph looks suspicious

  • Maybe JVM needed more RAM for some perfectly good reason that you don't know about (e.g. heavy load).

But, once the JVM actually physically allocates RAM, it rarely gives it back. It can, and with G1GC it should do it more often than with other garbage collectors, but you shouldn't assume the working set the operating system sees will actually go down.






share|improve this answer























  • Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

    – frankieta
    Apr 24 at 7:20











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
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%2fserverfault.com%2fquestions%2f956138%2fdifference-between-jvm-application-memory-footprint-and-os-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














Java Allocated Heap and Windows Working Set are not the same thing exactly.



Your 1.5 GB difference is because of how memory gets addressed on Windows. To explain this, here are the facts that I think are most relevant:



  • 'xmx' is 6 GB

  • You are on Windows

  • "Limit" in your graph is 5.3 GB.

  • You only see this after the server has been running for days

On Windows, the JVM needs a continuous block of virtual memory for the heap. It will address 6 GB when the application starts, but only allocate physically whatever value you set for 'xms' initially. As your application runs, it will eventually allocate more memory for the heap up to 6 GB minus whatever you need for non-heap memory (e.g. Metaspace for Java 8+). The non heap memory should stay pretty much constant at 660 MB, and on top of that there might be some additional memory for the JVM itself (128 MB, I think?).



Your chart from the profile indicates that 4.1 GB is currently allocated, but there is a limit of 5.3 GB. I believe "limit" is the maximum amount of space available for the heap, and is supposed to be equivalent to the 'xmx' value minus metaspace. It is very possible for 100% of this limit value to be reported as committed to the operating system because of the requirement to have a contiguous block of memory for the Java heap.



5.3 GB + 660 MB = 5960+ MB (probably more depending on how the limit got rounded). If we guess that it actually adds up to your xmx value of 6144, then 128 MB for the JVM = 6272 MB, which is a tiny bit more than your 6266 MB that Windows says is private.



The only question that remains is... why has your JVM physically addressed the entire available heap, if 'xms' is set to 512 MB? The answer is because it thought it was going to need the entire heap to be physically addressed for some reason. It clearly doesn't at the time that you are profiling it, but that is a pretty big dip in your graph when it does Garbage Collection (like 1 GB released in one shot?) The standard answers to this are:



  • You might have a memory leak - that graph looks suspicious

  • Maybe JVM needed more RAM for some perfectly good reason that you don't know about (e.g. heavy load).

But, once the JVM actually physically allocates RAM, it rarely gives it back. It can, and with G1GC it should do it more often than with other garbage collectors, but you shouldn't assume the working set the operating system sees will actually go down.






share|improve this answer























  • Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

    – frankieta
    Apr 24 at 7:20















1














Java Allocated Heap and Windows Working Set are not the same thing exactly.



Your 1.5 GB difference is because of how memory gets addressed on Windows. To explain this, here are the facts that I think are most relevant:



  • 'xmx' is 6 GB

  • You are on Windows

  • "Limit" in your graph is 5.3 GB.

  • You only see this after the server has been running for days

On Windows, the JVM needs a continuous block of virtual memory for the heap. It will address 6 GB when the application starts, but only allocate physically whatever value you set for 'xms' initially. As your application runs, it will eventually allocate more memory for the heap up to 6 GB minus whatever you need for non-heap memory (e.g. Metaspace for Java 8+). The non heap memory should stay pretty much constant at 660 MB, and on top of that there might be some additional memory for the JVM itself (128 MB, I think?).



Your chart from the profile indicates that 4.1 GB is currently allocated, but there is a limit of 5.3 GB. I believe "limit" is the maximum amount of space available for the heap, and is supposed to be equivalent to the 'xmx' value minus metaspace. It is very possible for 100% of this limit value to be reported as committed to the operating system because of the requirement to have a contiguous block of memory for the Java heap.



5.3 GB + 660 MB = 5960+ MB (probably more depending on how the limit got rounded). If we guess that it actually adds up to your xmx value of 6144, then 128 MB for the JVM = 6272 MB, which is a tiny bit more than your 6266 MB that Windows says is private.



The only question that remains is... why has your JVM physically addressed the entire available heap, if 'xms' is set to 512 MB? The answer is because it thought it was going to need the entire heap to be physically addressed for some reason. It clearly doesn't at the time that you are profiling it, but that is a pretty big dip in your graph when it does Garbage Collection (like 1 GB released in one shot?) The standard answers to this are:



  • You might have a memory leak - that graph looks suspicious

  • Maybe JVM needed more RAM for some perfectly good reason that you don't know about (e.g. heavy load).

But, once the JVM actually physically allocates RAM, it rarely gives it back. It can, and with G1GC it should do it more often than with other garbage collectors, but you shouldn't assume the working set the operating system sees will actually go down.






share|improve this answer























  • Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

    – frankieta
    Apr 24 at 7:20













1












1








1







Java Allocated Heap and Windows Working Set are not the same thing exactly.



Your 1.5 GB difference is because of how memory gets addressed on Windows. To explain this, here are the facts that I think are most relevant:



  • 'xmx' is 6 GB

  • You are on Windows

  • "Limit" in your graph is 5.3 GB.

  • You only see this after the server has been running for days

On Windows, the JVM needs a continuous block of virtual memory for the heap. It will address 6 GB when the application starts, but only allocate physically whatever value you set for 'xms' initially. As your application runs, it will eventually allocate more memory for the heap up to 6 GB minus whatever you need for non-heap memory (e.g. Metaspace for Java 8+). The non heap memory should stay pretty much constant at 660 MB, and on top of that there might be some additional memory for the JVM itself (128 MB, I think?).



Your chart from the profile indicates that 4.1 GB is currently allocated, but there is a limit of 5.3 GB. I believe "limit" is the maximum amount of space available for the heap, and is supposed to be equivalent to the 'xmx' value minus metaspace. It is very possible for 100% of this limit value to be reported as committed to the operating system because of the requirement to have a contiguous block of memory for the Java heap.



5.3 GB + 660 MB = 5960+ MB (probably more depending on how the limit got rounded). If we guess that it actually adds up to your xmx value of 6144, then 128 MB for the JVM = 6272 MB, which is a tiny bit more than your 6266 MB that Windows says is private.



The only question that remains is... why has your JVM physically addressed the entire available heap, if 'xms' is set to 512 MB? The answer is because it thought it was going to need the entire heap to be physically addressed for some reason. It clearly doesn't at the time that you are profiling it, but that is a pretty big dip in your graph when it does Garbage Collection (like 1 GB released in one shot?) The standard answers to this are:



  • You might have a memory leak - that graph looks suspicious

  • Maybe JVM needed more RAM for some perfectly good reason that you don't know about (e.g. heavy load).

But, once the JVM actually physically allocates RAM, it rarely gives it back. It can, and with G1GC it should do it more often than with other garbage collectors, but you shouldn't assume the working set the operating system sees will actually go down.






share|improve this answer













Java Allocated Heap and Windows Working Set are not the same thing exactly.



Your 1.5 GB difference is because of how memory gets addressed on Windows. To explain this, here are the facts that I think are most relevant:



  • 'xmx' is 6 GB

  • You are on Windows

  • "Limit" in your graph is 5.3 GB.

  • You only see this after the server has been running for days

On Windows, the JVM needs a continuous block of virtual memory for the heap. It will address 6 GB when the application starts, but only allocate physically whatever value you set for 'xms' initially. As your application runs, it will eventually allocate more memory for the heap up to 6 GB minus whatever you need for non-heap memory (e.g. Metaspace for Java 8+). The non heap memory should stay pretty much constant at 660 MB, and on top of that there might be some additional memory for the JVM itself (128 MB, I think?).



Your chart from the profile indicates that 4.1 GB is currently allocated, but there is a limit of 5.3 GB. I believe "limit" is the maximum amount of space available for the heap, and is supposed to be equivalent to the 'xmx' value minus metaspace. It is very possible for 100% of this limit value to be reported as committed to the operating system because of the requirement to have a contiguous block of memory for the Java heap.



5.3 GB + 660 MB = 5960+ MB (probably more depending on how the limit got rounded). If we guess that it actually adds up to your xmx value of 6144, then 128 MB for the JVM = 6272 MB, which is a tiny bit more than your 6266 MB that Windows says is private.



The only question that remains is... why has your JVM physically addressed the entire available heap, if 'xms' is set to 512 MB? The answer is because it thought it was going to need the entire heap to be physically addressed for some reason. It clearly doesn't at the time that you are profiling it, but that is a pretty big dip in your graph when it does Garbage Collection (like 1 GB released in one shot?) The standard answers to this are:



  • You might have a memory leak - that graph looks suspicious

  • Maybe JVM needed more RAM for some perfectly good reason that you don't know about (e.g. heavy load).

But, once the JVM actually physically allocates RAM, it rarely gives it back. It can, and with G1GC it should do it more often than with other garbage collectors, but you shouldn't assume the working set the operating system sees will actually go down.







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 23 at 16:25









JoeJoe

1362




1362












  • Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

    – frankieta
    Apr 24 at 7:20

















  • Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

    – frankieta
    Apr 24 at 7:20
















Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

– frankieta
Apr 24 at 7:20





Thank you Mark, especially for noting the contiguity between my windows value and the "limit + non-heap + jvm additional memory". For the "memory leak" part, I thought we had one, that's why I'm profiling memory with more attention; but if we had one, shouldnt be the GC ineffective? That's why the references to those objects still holds, and cant be collected.

– frankieta
Apr 24 at 7:20

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • 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%2fserverfault.com%2fquestions%2f956138%2fdifference-between-jvm-application-memory-footprint-and-os-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

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company