memory usage

From: Tore Halset (halse..vv.ntnu.no)
Date: Thu Apr 21 2005 - 04:51:36 EDT

  • Next message: Andrus Adamchik: "Re: log4j/jetty5 issues"

    Hello!

    This is only partly related to cayenne. Sorry.

    We have got some OutOfMemoryErrors in our system, so I have done some
    analyze and some fixing. I have fixed the main problems, but I want to
    get control over this memory issue. The cayenne application runs inside
    a jboss instance with -Xmx1000MB.

    I am able to run the system with a profiler on my developent computer,
    but our main system has to run without a profiler as the profiler I am
    using makes the system to slow. I have set up a simple servlet that
    reports the memory usage and an external shell-skript that collects
    this info every minute and present it using gnuplot. This setup has
    been very nice as I can compare with other logs and see what operations
    that are consuming the most memory.

    I have cut down session timeout from 600 to 300 minutes. 300 is also
    fairly long, but our users want to be able to be idle for that long.
    Each session has a DataContext that I guess could hold lots of
    DataObjects.
      * Could I (from code) examine the memory usage of the session-bound
    DataContexts?
      * Is it possible to empty an DataContext after a havy (lots of
    objects) operation? Would it save memory?

    The cayenne.DataRowStore.snapshot.size was set to 1e6, but are 200e3
    now. Is it possible (from code) to see some statistics for the
    DataRowStore? Like how full it is, how many old objects, how much
    memory etc? I think this would be a nice function? Perhaps I am using a
    to large snapshot size? What are you using?

    Something more to watch out for?

    Regards,
      - Tore.



    This archive was generated by hypermail 2.0.0 : Thu Apr 21 2005 - 04:51:41 EDT