Home » Java » How to minimize the Ram Memory of Spring Boot Apps?

How to minimize the Ram Memory of Spring Boot Apps?

Posted by: admin May 17, 2018 Leave a comment

Questions:

I have deployed multiple (7 apps) Spring boot apps on same server (4 GB RAM).
Each spring boot contains the following:

Eureka Client
Data JPA
AMQP (RabbitMQ)
Web, Webmvc
Actuator
Test
Devtools

Without Java OPTS (-Xmx and -Xss), each spring boot is taking 400MB-500MB memory (RAM).
So I have added Java OPTS like below:

java -Xmx64m -Xss256k -jar test.jar

Now the memory (RAM) reduced to 200MB-300MB.

Can anyone guide me on decreasing the memory ?
Are the java opts and their sizes mentioned above fine ?

Answers: