Em 16/02/2013 03:15, Angeles Jesus Jr. Calimlim escreveu:
Hi Tomcat users,

I run a website using Tomcat 6.

i was wondering if there are things i should do e.g.:
- to free up some hdisk space occupied by Tomcat
- or free up some memory occupied by Tomcat
- or anything that can improve its performance

I use it for my production website, but have no sufficient knowledge on maintaining (or improving performance) it in production.


Do you have any goal or is just throwing up disparate ideas?

This is a long answer just because I can't understand what you want to know.

I can't answer your points above, but I can tell what **I** have as minimum server:

1) Hardware: Cloud server, 1GB RAM, 40GB HD, 1 core x 1Ghz.
2) Software:
2.1) How much disk space for a minimal Tomcat application: 8,5 MB
2.2) How much disk space for 5 web apps: 369Mb (including libraries)
2.3) Temporary space (work and temp folders): 16,5Mb
2.4) Space for logs (more than a year of collected logs): 10Mb
3) How many users served by this server: 50
4) Other software in same server: PostgreSQL 9.2 database, using 5,3Gb for data and regular backups

As server has 1Gb of RAM, I have setup swap - but never used it. Tomcat 7.0.35 behaves correctly, latest JDK 7 Virtual Machine with some tunning, and I was able to balance memory between Tomcat and PostgreSQL. I've set maximum of 768Mb for Tomcat, and 256 Mb for PostgreSQL. Result is:



Looking VisualVM statistics of this production server in a typical day of work, I get the following:



So, as you can see, Java applications are not that "huge memory eater" as normally people advertise.


My startup parameters follow (they don't guarantee success, but they are working for me):

-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Xmx768m -XX:NewSize=160m -XX:MaxNewSize=200m -XX:PermSize=96m -XX:MaxPermSize=200m


**Test everything before putting this in production**. Just because it works for me, doesn't guarantee it will work for you (or your applications).

After all, BE CAREFUL.

I've complete control of how my apps are being developed, and I'm very careful with resources release - most of problems in Java applications are related to not releasing resources in appropriate way (I mean, files, JDBC connections, transactions, network connections, temporary files, session content, patterns like utility or builder, caches, threads, etc).

Kind regards,

Edson Richter



Reply via email to