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

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020