Java Heap Allocation for Tomcat on EC2 Instance

I am writing a Java servlet that I plan to deploy to Amazon AWS using Elastic Beanstalk. My tests show that everything works well using the Small EC2 instance, using their Tomcat AMI stock, which uses Beanstalk.

I am trying to figure out how to properly allocate Java heap space for this configuration. A small instance has 1.7 GB of memory, so I think a bunch of 1024 MB will work well. I understand that memory will be needed for other things, although the only "real" purpose of this instance is to run Tomcat. And I also know that there is a point with large heaps where the standard Sun / Oracle JVM does not really work.

Is this a smart way to allocate memory? Should I use more or less? What tools can I use to determine the best configuration?

+5
source share
2 answers

1024 looks ok maybe a little.

I'm not quite sure what your servlet is doing, but in order to give you an idea, I have an e-commerce application with about 1000 daily users working on two small copies of ec2. Tomcat downloads are distributed via mod_jk.

JVM . , , -, .

Windows Linux? IMO, Linux .

, ec2 JMeter - . - ( , linux, ).

, , . ec2, .

+2

newrelic java, .

0

All Articles