2 Replies Latest reply on Jul 7, 2008 11:41 AM by brentshikoski

    AjaxStateManager memory footprint

    brentshikoski

      I'm looking at adding some RichFaces components to a few existing applications. From what I understand RichFaces uses it's own JSF StateManager (org.ajax4jsf.application.AjaxStateManager).

      When I add RichFaces to a relatively small application, I'm seeing a significant increase in session size, in my case it's adding about 300k in the LRUMap under the org.ajax4jsf.application.AjaxStateManager.VIEW_STATES_MAP session variable.

      When I've added it to a larger application, I'm seeing the LRUMap in the session grow into the 20+ megabyte range. I added the org.ajax4jsf.cache.LRU_MAP_CACHE_SIZE context-param to try to limit the size of the cache (to 1), but it's still averaging around 4 meg.

      Before adding RichFaces I was seeing sessions average around 1-3k.

      Is normal behavior or do I have something mis-configured?

        • 1. Re: AjaxStateManager memory footprint
          brentshikoski

          I'm currently using version 3.1.6 (jsf 1.1 RI). I tested out version 3.2.1 (jsf 1.2 RI), but the session memory footprint is relatively the same.

          I've also tried switching from jsp to facelets, but get pretty much the same result.

          • 2. Re: AjaxStateManager memory footprint
            brentshikoski

            I downloaded and ran richfaces-demo-3.1.5.GA.war on jboss as 4.0.4.GA. I'm seeing the VIEW_STATES_MAP reach 1.5+ megabytes.

            I'm serializing the objects to determine their size. I know it's not the same as the actual size an object takes up in memory, but its the way a lot of tools will determine session object size, besides, the session objects need to serialized for session fail-over anyway.

            Is anyone using RichFaces to build large applications that support hundreds of users? I'd be interested to know what kind of session sizes they are seeing and find out their heap settings.