java - Experiences with escape analysis enabled on the JVM -


I just tried to enable the -XX: + DoEscapeAnalysis option to jdk6 Is U-18 VM (on the Solar System) and a disappointing experience. I am running a Scala app that is a lot of actors (20,000 of them) is a recipe for this garbage-creation!

The app can usually run with a stack of 256 MB, but generates a huge amount of garbage in a steady state :

< Ul>
  • Spends 10% of GC
  • generates 150 MB of garbage & lt; 30 which then becomes GC 'D'
  • I think analysis of escape can be helpful, so I enabled the option and ran the app again. I came to know that this app was unable to remove that garbage, which it had gathered, until it finally seemed to be spending the whole time to GC and the app's full allocation "Flatlining" was.

    At this point I should say that the app did not throw out the OutofMemory error which I expected. Probably JConsole (which I was using to analyze) does not display GC figures correctly with this option (I'm not sure)?

    I then removed the option and restarted and the app became "normal" again! Anyone can know what is happening?

    1 Survived analysis shown as being able to be in JConsole? You need to make sure that you are running VM with the server option. I think you were doing this work, but I thought I would check.

    2 I do not think the survival analysis will help Scalay to act with the actors. If you do something like this then you can get a big advantage:

      def Act (): unit = {val omgHugeObject = new OMGHugeObject (); OmgHugeObject.doSomethingCrazy (); }  

    In the example above of escape aliology, it can be that omgHugeObject can be allocated on a stack instead of a heap and thus does not make garbage I do not think that it is likely that escape analysis will help actors. Their references are always "escaped" for the actor subsystem.

    3 Are you on the recent release of Scala? There was a memory leak which I believed was fixed in the recent edition. It also arose due to the creation of your own ectary library which you can see in

    4 You can try the G1 Garbage Collector, you can enable it:

    -XX: + Unlock Experimental Yovation -XX: + UseG1GC


    Comments

    Popular posts from this blog

    sql - dynamically varied number of conditions in the 'where' statement using LINQ -

    asp.net mvc - Dynamically Generated Ajax.BeginForm -

    Debug on symbian -