2 Replies Latest reply on Jun 6, 2008 4:09 AM by cbkihong.cbkihong.hotmail.com

    Seam with Limited Memory

    cbkihong.cbkihong.hotmail.com

      I am new to Seam. In order to search for a framework for reusable Web development, I have read part of the Seam reference manual and I think I am fond of the simplicity a Seam application can be built compared with Spring, so I am thinking about developing my first Seam Web application.


      However, the deployment environment of mine is rather restricted. I think the most significant limitation is memory. That is what worries me over a comparable PHP-based deployment. I don't have the limits received yet but I think it is safe to assume I cannot consume over 96MB.


      I have test-deployed the jboss-seam-hibernate example on Tomcat 6 in that environment. With mine as the only visitor the performance was okay after tuning the JVM parameters. The exact JVM parameters I have configured are


      -Xms16m -Xmx64m -XX:NewRatio=2 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:MaxPermSize=48m


      Tomcat status page read:
      Free memory: 4.80 MB Total memory: 21.41 MB Max memory: 46.81 MB


      Must I be worried as I roll out more Seam? Or, what other points should I attend to when using Seam in an environment with limited resources? I assume using Tomcat is more resource-friendly in this context compared with a full JBoss installation, though I prefer JBoss in fact?

        • 1. Re: Seam with Limited Memory
          ericjava.eric.chiralsoftware.net

          For deploying multiple apps, you're better off with JBoss than with multiple Tomcat embeddeds.  A single Seam app on JBoss might be able to run in that little memory.


          But seriously... if this project has so little resources allocated to it that 96mb is all that can be spared ($3 worth of memory?) then you should be asking questions about the project itself.

          • 2. Re: Seam with Limited Memory
            cbkihong.cbkihong.hotmail.com

            I will not be deploying multiple WARs on a single server. I only intend to deploy one WAR that is the Seam application. What I meant was, as I deployed more pages and more beans than the Seam Hibernate hotel demo application, will resource becomes an issue then due to the stateful nature of Seam? Or is that plain irrelevant? I do not expect high traffic at all but sure if you deploy something on the Web that will be accessible to everyone.


            I do not plan to use any EJB or other JavaEE-specific features so I am open to Tomcat standalone if that is more resource-friendly than a full JavaEE AS like JBoss.


            I am on paid hosting with a VPS-based setup and cannot afford to go dedicated at this stage, because it is not commercial in nature. Sure if the Seam app is running on my desktop dedicated with 2GB RAM and Core-2-Duo I will not be too much concerned about this.