Force the JVM to collect garbage early and reduce system memory used early
问题 We operate a Java application that we did not develop. This application uses quite a lot of memory for certain tasks, depending on the data, that is manipulated, up to 4GB. At other times, very little memory is needed, around 300MB. Once the JVM grabs hold of a lot of memory, it takes a very long time until the garbage is collected and even longer until memory is returned back to the operating system. That's a problem for us. What happens is as follows: The JVM needs a lot of memory for a