How does Java use XMX and XMS memory?

I have Tomcat configured XMS=XMX(4G both).

But - what if I install XMS, for example, 1G?

As I understand it, the JVM will launch Tomcat with 1G memory provided. Then, if the application requires more - the JVM will raise it to 4G for a certain period. To boost it - Java has to do some things (resize, move pages to memory?) - and it takes some time and CPU resources, right?

What happened after the Tomcat application does not need so much memory? Does Java run actions again to reduce memory usage?

Thanks.

PS Why do I ask - with XMS=1Gand XMX=4G Apache Jmeter give results that are much less ( Throughputand Average) than if I started Tomcat with XMXand XMSlike 4G.

+4
source share
2 answers

, JVM (Eden, from, to, old PermGen), . , webapp , .

JVM , , . , 4GiB, JVM , 4GiB , JVM .

+2

Xms Xmx JVM , JVM . , Jmeter , . Jmeter, Tomcat , .

+1

All Articles