why running garbage collector sometimes increase reserved ram java?

2020-09-13T21:07:58

we have a java8 web application running on tomcat8.5.47 server.we have only 20-60 users sessions per time but most of time up to 600mb uploading files on server.we also use hibernate and c3p0 for manage database connections. we monitored server several days and saw sometimes java reserved ram increased suddenly and garbage collector did not released it.how can we manage this?and is there any way to release reserved ram and prevent tomcat from increasing ram? and also any way to decrease used ram in task manager?

these are our settings:

-XX:MaxPermSize=1g  -XX:+UseG1GC  -XX:+UseStringDeduplication  -XX:MaxHeapFreeRatio=15  -XX:MinHeapFreeRatio=5  -XX:-UseGCOverheadLimit  -Xmn1g  -XX:+UseCompressedOops  -Xms10g  -Xmx56g

and it is an image of profiler when this happened: enter image description here

and it is an image of profiler and also task manager after 2 hours: enter image description here

P.s. we use jprofiler to profile and the green colour shows reserved ram and the blue colour is for used ram.also in second box you can track gc activity and third is for classes and forth shows threads activities and last is for cpu activities.
Thank you all for your answers.

Copyright License:
Author:「leila s」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/63871149/why-running-garbage-collector-sometimes-increase-reserved-ram-java

About “why running garbage collector sometimes increase reserved ram java?” questions

we have a java8 web application running on tomcat8.5.47 server.we have only 20-60 users sessions per time but most of time up to 600mb uploading files on server.we also use hibernate and c3p0 for m...
After noticing that memory was not being freed in a GUI app, I made a simple test: import gc class Item: def __init__(self, parent=None): self.items = [] self.parent = parent #...
I am trying to understand the garbage collector method. "In Java, your program must call the garbage collector method frequently; otherwise your program will be overrun with garbage objects...
I understand that we cannot guarantee that garbage collector is called in java. public class finalizeDemo { protected void finalize() { System.out.println("Wow!! I am called"); } }
Finalize methods are invoked by the garbage collector prior to reclaiming the memory occupied by the object, which has the finalize() method. This means you do not know when the objects are going t...
We have 10 spring boot applications which are running on ubuntu18 with 8GB RAM and Java 11. We are running the apps using java garbage collector -XX:+UseSerialGC without restricting the heap space...
I am trying to run a Java program on GraalVM Community Edition 1.0 RC4 , the code works with last JDK 8 version. The code runs the same way with GraalVM but the same error message is printed in the
I actually have a quick question which I cannot find an answer to. I am VERY persistant that my Android/Java application eats up the least amount of RAM as possible as it helps the user experience.
I'm working on an app that handles a lot of allocations (on the order of 4 million doubles and a million classes). I was looking through garbage collector logs and I'm seeing different amounts of m...
Generally speaking the CPU utilization of CMS garbage collector (or any other concurrent garbage collector) is higher than the throughput garbage collector and it's mentioned in the book Java perfo...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.