Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have been thinking about how to manage RAM between different 3 java webapps. I have blurred concepts in mind. Deploy all the web apps in the same tomcat7 instance or have 3 different instances of tomcat 7 in which I will deply a web app each.

But the big questions is how to efficiently share 10GB of the box (12GB RAM) among them? let's say I have 3 GB for mysql, so app A takes 4GB, app B 2GB and C 1GB.

what are the known and best practice to achieve this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If you haven't already, you should profile you applications through load testing, code profiling, gc logging, etc to see how the actual memory footprint, and address any memory leaks ahead of time.

Having said that, I would go for three separate instances of Tomcat, each running its own app. This way you can set memory allocations (Xms, Xmx, etc) per Tomcat process/instance. I don't think you can set those per app.

Another advantage of running separate instances of Tomcat for each app would be the ability to restart each instance of Tomcat separately (if you had to), without effecting the availability of the other apps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.