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

I have currently a Linux Server with Java 1.6 and Apache Tomcat/6.0.18 with 512 Mb memory. I am currently hosting one webapp but I plan to move three more applications to this Tomcat instance.

My setenv.sh file is:

JAVA_OPTS="-Xms16m -Xmx256m -XX:MaxPermSize=128m -Djava.awt.headless=true"

When I execute free -m

          total       used       free     shared    buffers     cached
Mem:           512        461         51          0         60         52
-/+ buffers/cache:        348        164
Swap:          127          3        124

Sometimes the used memory goes up until 506 or so.

I guess I have to upgrade the memory. I was thinking about 800 Mb or a 1 Gb. Do you think is a good idea? Will I see the improvent? How should I configure my seteven.sh file after the upgrade?

share|improve this question
add comment

2 Answers

How much you need completely depends on the architecture of your application(s) and what they are requiring. Adding memory is almost always a good idea. It's hard to say if you'll see improvement if you add 2 more apps to the server that are not there now as you'll not have comparable statistics. If you want to see an improvement add the memory prior to adding the additional applications. The parameters you use for JAVA_OPTS are, again, going to depend on the memory requirements of your applications.

share|improve this answer
add comment

The question is a little vague in that it depends on the applications you're running. If you can up the memory to a gig, you should see some improvement if there's some load (if nothing else it'll give you more leeway in performance), and with current RAM prices I don't think you have much to lose in investing in that extra 512.

In the end you really need to just watch performance as you load it up with other applications. It'll depend on how many people are using your server and how the applications were written (heavy I/O? is it taking more shared or independent memory? etc...)

If I were you and you have the chance to up the memory, go for it. You wouldn't really regret it. But to answer your question...you'd have to try it and see.

share|improve this answer
add comment

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.