5

I have recently started using the Spring Tools Suite (STS 2.7.2), and it seems the memory consumed by the IDE keeps increasing as you continue to work. The usage of the IDE has been pretty limited as of now (no heavy server integration or so...) - just 4-5 Spring projects being worked upon, with a couple of plugins integrated : Maven and Perforce.

As a stat, when the STS workbench was launched, the memory consumption was of the order of ~300MB, but gradually increases to ~800MB.

And then the only option I have is to restart the IDE (after my system obviously goes low on memory).

Is this a known issue? Any workarounds on how to avoid this, or check what may be causing this?

logoff
  • 3,347
  • 5
  • 41
  • 58
Saket
  • 45,521
  • 12
  • 59
  • 79

2 Answers2

5

This is a genuine problem with Spring STS. It keeps increasing the memory it uses and then ultimately crashes without killing the javaw.exe process in the windows process tree.

openSource
  • 191
  • 2
  • 6
5

There are no known memory issues with STS. By default, STS starts with 1024M of heap space. However, this is usually not completely necessary. Typically, STS/Eclipse will use a significant amount of memory on startup as things get initialized (such as Java search indexes, the package explorer, icons, etc.), but this memory usage will level off and decrease over time. Some operations like full builds and Java search will cause temporary spikes in memory usage, but again, memory should go down over time.

You can try running with the Heap status widget active. Go to Preferences -> General -> Show heap status. This will allow you to force garbage collection and you should see your memory usage go down.

If memory continues to increase and you eventually get out of memory errors, then something bad is definitely going on. How much physical memory does your system have?

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
  • I did try a forced GC, but it still seems to use around 600K. I have a 100GB disk, and a 6GB RAM. – Saket Sep 29 '11 at 14:58
  • 1
    I'm guessing you mean 600M. 600M does sound high for a steady state of memory usage. Are you running on a 64 bit jvm? I know that Eclipse on a 64 bit jvm uses significantly more memory (as would all Java programs since pointers need to be 64 bit addressable). – Andrew Eisenberg Sep 29 '11 at 22:15
  • oops...sorry, yea I meant 600M. Yes, am on a 64-bit JVM. – Saket Sep 30 '11 at 03:54
  • I would imagine, but can't say for certain that you would be using less memory if you moved to a 32 bit jvm. – Andrew Eisenberg Sep 30 '11 at 15:13