Eclipse does not free console memory (log) after cleaning

The My Eclipse trail is steadily growing from 500 MB to> 1 GB, without any special action - just run some heavy programs from the log. Performing a manual GC, closing and reopening projects does not help at all, if it exceeds 1 GB, it stays there.

I ran jvisualvm and learned from heapdump that hundreds of megabytes of char [] representing the output of the log .

I make it a habit to close all consoles of stopped processes, so this is not the case. The console buffer is set to 1 MB (characters). I closed the console view and reopened it.

I can insert my eclipse.ini, but I tried different GC and memory settings, different JVMs, different versions of Eclipse - the behavior is still the same.

It seems to me that the magazines are stuck with a link somewhere and are never released. Has anyone else encountered this problem? Is there any option to free memory from old console views?

+7
source share
2 answers

Short answer: heap size does not decrease, only grows.

Long answer: In the end, it seemed like a combination of factors. I'm not quite sure what the default JVM settings should be, but my XP machine has a Windows performance optimization set to Server / Background Applications. I believe this also causes the JVM to use the "-server" option instead of the "-client" by default. The -server option does not reduce the heap.

As far as I found out, parallelGC does not allow the heap to shrink.

The default values ​​for XX: MaxHeapFreeRatio (70) and XX: MinHeapFreeRatio (30) are pretty lazy in refusing free memory. Setting them to 20/10 will cause the heap size to be closer to the actual use.

Why is all this important? Well, if you are developing a Java desktop application, your client may be frustrated by the ever-increasing memory usage and blame your poor programming. A view similar to what happens with Firefox.

0
source

While I was thinking of something smart to write here, I found this: How to reduce Eclipse memory usage? In cases where the suggestion to turn off spellchecking actually made a lot of difference .

So here is my own contribution: this may seem strange, but I also noticed that I have a lot of unused breakpoints, which eclipses Eclipse. Regularly cleaning all breakpoints is a common habit.

This is just a hint related to this, it is possible to show memory and force the GC from Eclipse. In section

Settings> General> Show Heap Status

+1
source

All Articles