Reformat Code GC-thrashing

已回答

Hi Folks, 

I gave IDEA 50Gb of RAM and kicked off Reformat Code for the whole codebase.  After a few hours it was using 8Gb and thashing, in what appeared to be a constant attempt to reclaim memory.  It was still processing classes, but at the rate of 1 class every 15 seconds, which is unhelpful since this Java codebase contains in excess of fifty thousand classes.

I'd be interested to know if there are known memory leak issues in the Reformat Code activity, and whether there are any plans to address these.

My platform for that project is IntelliJ IDEA 19.1 on Windows 7 (I do not have the ability to try the same on MacOSX).

Kind regards, Robin.

 

0

Please refer to https://intellij-support.jetbrains.com/hc/articles/207241235 .

Submit a performance problem at https://youtrack.jetbrains.com/issues/IDEA, attach a CPU snapshot and a memory snapshot. Large files can be uploaded via https://uploads.services.jetbrains.com/ .

0

This is not quite so easy.

I set the suggested properties in idea64.exe.vmoptions, restarted the IDE and then kicked off Reformat Code.

After 60 minutes the IDE was almost dead to the world, taking minutes to repaint the screen on change of focus to IDEA.  The message at the bottom says:

"Low Memory: The IDE is running low on memory and this might affect performance. Please consider increasing available heap."

But the IDE has not actually triggered an OutOfMemoryError (it is just thrashing RAM), and so the heap dump has not occurred.

Since this task cannot be run in "Background" mode, I am unable to trigger the heap dump manually.

Any other ideas?

This is not stopping me from working - I can kill the IDE and just not do the Reformat, or I can do it "module-by-module".  We have 100+ of those though, so I won't be rushing into doing so.

Kind regards, Robin.

 

# custom IntelliJ IDEA VM options

-Xms1g
-Xmx8g
-Xss16m
-XX:MaxMetaspaceSize=512m
-XX:ReservedCodeCacheSize=512m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:-OmitStackTraceInFastThrow
-Dvcs.log.index.git=false
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:/Users/roosrob/Documents

 

 

0

You can use jmap to get the heap dump as described in the same document.

0

请先登录再写评论。