memory usage increases on application stop

2008-01-11 Thread Morten Matras
Case:

I've deployed an application on a Tomcat 6.0 (current release). The
application is a Hibernate / Stripes application.


Almost no memory is allocated due to the deployed application.


Setting:


-Xmx64m -XX:MaxPermSize=128m


Tomcat without application uses: 27,5M (real memory) and 349M (virtual
memory)
Tomcat with application uses: 133M (real memory) and 367M (Virtual memory)


Now if I stop this application (using the manager) the memory profile
becomes:


Tomcat with stopped application: 128M (real memory) and 679M (virtual
memory)


So stopping the application increases the virtual memory usage from 367 to
679 m and stays there!


Undeploying a stopped application doesn't change the numbers.


Why does stopping (or undeploying) a webapplication cause a dramatic
increase in memory usage?


My guesses:
 - Some ressources are not freed? (database connections)
 - Some hibernate related stuff are trapped in a circular relation circle?
 - Tomcat punishes me for stopping something it really liked :-)



-- 
  Morten Matras
  Udviklingschef
  GAMP Media og Blob Communication ApS
  Svendsagervej 42
  5240 Odense NØ
  Tlf: 61711103
  E: [EMAIL PROTECTED]

  T: 76 654321
  W: www.blobcom.com
  E: [EMAIL PROTECTED]


Tomcat setup

2008-01-11 Thread Morten Matras
How would you set an environment up for the following case:

 - 20 independent (non related) webapplications with low traffic < 200
unique (real) visitors per day per webapplication
 - Application architecture: Hibernate, >Java 1.5 and Stripes under the
hood.

I've set the system up with 1 tomcat per webapplication, but this uses a lot
of memory, so I'm considering changing that to have 1-3 Tomcat's, but need
som verification on the road to choose:

 - Tomcat 5.5 vs Tomcat 6.0?
 - What memory settings must I set? MaxPermSize, Xms, Xmx? to ensure a low
memory usage while still making sure that the server continues to run even
during peak periods.

Please share your thoughts.


Thanks

-- 
  Morten Matras
  Udviklingschef
  GAMP Media og Blob Communication ApS
  Svendsagervej 42
  5240 Odense NØ
  Tlf: 61711103
  E: [EMAIL PROTECTED]

  T: 76 654321
  W: www.blobcom.com
  E: [EMAIL PROTECTED]


Stopping / undeploying application doubles memory allocation

2008-01-10 Thread Morten Matras
Case:
I've deployed an application on a Tomcat 6.0 (current release). The
application is a Hibernate / Stripes application.

Almost no memory is allocated due to the deployed application.

Setting:

-Xmx64m -XX:MaxPermSize=128m

Tomcat without application uses: 27,5M (real memory) and 349M (virtual
memory)
Tomcat with application uses: 133M (real memory) and 367M (Virtual memory)

Now if I stop this application (using the manager) the memory profile
becomes:

Tomcat with stopped application: 128M (real memory) and 679M (virtual
memory)

So stopping the application increases the virtual memory usage from 367 to
679 m and stays there!

Undeploying a stopped application doesn't change the numbers.

Why does stopping (or undeploying) a webapplication cause a dramatic
increase in memory usage?

My guesses:
 - Some ressources are not freed? (database connections)
 - Some hibernate related stuff are trapped in a circular relation circle?
 - Tomcat punishes me for stopping something it really liked :-)


Regards

-- 
  Morten Matras
  Udviklingschef
  GAMP Media og Blob Communication ApS
  Svendsagervej 42
  5240 Odense NØ
  Tlf: 61711103
  E: [EMAIL PROTECTED]

  T: 76 654321
  W: www.blobcom.com
  E: [EMAIL PROTECTED]


Preferred setup

2008-01-10 Thread Morten Matras
How would you set an environment up for the following case:

 - 20 independent (non related) webapplications with low traffic < 200
unique (real) visitors per day per webapplication
 - Application architecture: Hibernate, >Java 1.5 and Stripes under the
hood.

I've set the system up with 1 tomcat per webapplication, but this uses a lot
of memory, so I'm considering changing that to have 1-3 Tomcat's, but need
som verification on the road to choose:

 - Tomcat 5.5 vs Tomcat 6.0?
 - What memory settings must I set? MaxPermSize, Xms, Xmx? to ensure a low
memory usage while still making sure that the server continues to run even
during peak periods.

Please share your thoughts.


Thanks

-- 
  Morten Matras
  Udviklingschef
  GAMP Media og Blob Communication ApS
  Svendsagervej 42
  5240 Odense NØ
  Tlf: 61711103
  E: [EMAIL PROTECTED]

  T: 76 654321
  W: www.blobcom.com
  E: [EMAIL PROTECTED]