TLDR; Why bother settings -Xmx and -Xms in a kubernetes app? We’ve inherited a kubernetes app that is having out of memory errors. It looks like the initial devs set kubernetes resource limits (.95 CPU core and 4Gb memory) as shown below. However, they also set the max heap size in JAVA_OPTS -Xmx to 800mb. I’ve found lots of good
Tag: heap-memory
JVM Getting the largest objects in the heap programmatically
How programmatically (from within the java application/agent) do I get a “live” summary of the largest objects in the heap (including their instances count and size)? Similarly to what Profilers do. For example, here is a screenshot from JProfiler: Usually I used to work with heap dumps in the cases where I really needed that, but now I would like
Heap allocation source code in in jdk(G1GC) [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 2 years ago. Improve this question I want to understand how java allocates objects in heap. I
What is leaking int arrays in my program?
I have Java program that, over about 16 hours, is slowly filling the heap with integer arrays that the GC is not getting rid of. I only have VisualVM available to diagnose the problem, which is how I found that it’s int[] that is filling the heap. Any ideas how I can find the source of the int[] creation? I’m
Ignite heap not release, this is a memery leak?
I have a 20 minute pressure test during which the free JVM heap size drops from 97% to 3%. Even if I wait 5 hours, the amount of free space does not change. If I try to have a test again, the GC has too much work and causes a long JVM pause. I use 2.7 Ignite, I do not
Java program failing to map Native memory allocation
Java program failing to allocate Native memory even after enough RAM is available. The program crashes repeatedly after failing with os_commit exceptions. Any recommendation to update to tune Java Heap etc. As per the logs you can see that there is enough memory available Resource Utilization JMap Output Java Version Redhat Release Answer You are possibly impacted by this As
Does final variables occupy memory on a per-instance basis?
I have read other question-answers regarding final instance variables and i came to knew that non-static final instance variables are created in heap for every instance of the class but in java -the complete reference by herbert schildt it is said that : Variables declared as final do not occupy memory on a per-instance basis .thus, a final variable is
Does both Heap and Stack of Java reside in RAM, similar to C++?
This question is not about difference between Stack and Heap in Java. In C++, both Stack and Heap are in RAM. How is it in Java? Answer Yes. Stack is used for static memory allocation and Heap for dynamic memory allocation, both stored in the computer’s RAM This is to ensure faster processing of java programs.
What does push into stack means? move or duplicate method?
When an object calls a function, the function would be pushed from the method area into the stack. My question is: Q: What does that “push” mean in this context? Does that simply mean move(from the method area) or copy of the function(a copy of the method pushed onto the stack)? Answer The method itself is not pushed onto the
Instance created inside of a Method
I have not been able to find any reliable literature on this but i’m curious as to where an object is stored if its created inside of a method ? on the stack or on the heap in java 8? I know that normally only local primitives, reference variables and function calls are stored on the stack and that objects