On Fri, Jan 6, 2017 at 2:59 PM, Vladimir Ivanov < vladimir.x.iva...@oracle.com> wrote:
> LambdaForm caches deliberately keep LF instances using SoftReferences. > > The motivation is: > (1) LFs are heavily shared; > (2) LFs are expensive to construct (LF interpreter is turned off by > default now); it involves the following steps: new LF instance + compile to > bytecode + class loading. > > So, keeping a LF instance for a while usually pays off, especially during > startup/warmup. There should be some heap/metaspace pressure to get them > cleared. > > As a workaround, try -XX:SoftRefLRUPolicyMSPerMB=0 to make soft references > behave as weak. I'll pass that along, thank you. I'm not sure how vigorously he's tried to get GC to clear things out. Not sure the problem relates to j.l.i & LFs since the report says indy in > jruby is turned off. For heavy usages of indy/j.l.i 1000s of LFs are > expected (<5k). The question is how does the count change over time. > JRuby has progressed to the point of using method handles and indy all the time, since for some cases the benefits are present without any issues. "Enabling" indy in JRuby mostly just turns on the use of indy for method call sites and instance variables now. That said, the numbers this user is reporting do seem really high, which is why I asked in here for similar stories. Even if we considered a very large Ruby application with many hundreds of files, we'd still see non-indy MH usages in JRuby in thousands at best (mostly for "constant" lookup sites). - Charlie
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev