Re: Memory Management using Tomcat

From: Joe Baldwin (jfbaldwi..arthlink.net)
Date: Wed Sep 16 2009 - 18:07:33 EDT

  • Next message: Lachlan Deck: "Re: undelete"

    Michael,

    Thank you for your patience on this. This is the worst problem I have
    encountered and I believe that it is probably something I have
    misunderstood (and failed to implement).

    > FWIW, I just did a little monitoring with JConsole with my current
    > development setup: Eclipse, Jetty, Cayenne 3.0M6, Tapesty 5.1, MySQL.

    Yes I am able to monitor with JConsole on my development machine (but
    not yet on the webhost). With shared cache ON, and testing with
    50-100 concurrent users, it starts out at about 10-15 MB and then
    spikes to 70-100MB. Most of the time after the Tomcat idle period
    (i.e. 15 min) it GC down to about 20MB-15MB.

    > This new application I'm working on sounds similar to yours. Fairly
    > lightweight. After everything loaded in, I was using 20-21 MB of
    > memory and it stayed steady, even after doing about 100 queries in
    > Cayenne (I tend to pull back 1-7 records per set-of-queries, but
    > closer to 2-3 on average).

    The app sounds similar, but my JConsole reports a huge spike which is
    only released after the idle period. (This is with the Cache set to ON.)

    > I'm using session-based data contexts and
    > on-demand data contexts. The memory footprint was fine and I'm not
    > caching (I go get fresh data every query). I'm not sure why you are
    > seeing the anomaly you are seeing unless you just need a bit more RAM
    > for Tomcat to be stable.

    Mike Kienenberger recommended that I handle this via a filter. I must
    admit that I am still not totally comfortable with BaseContext and
    could have made a mistake. I did not want to go in this direction
    until I am sure that I have the blue-print for the correct solution.

    So how do I implement you session-based data context configuration.
    (Please send explicit code as it appears that I am just using the
    default BaseContext.)

    Thanks,
    Joe



    This archive was generated by hypermail 2.0.0 : Wed Sep 16 2009 - 18:08:16 EDT