Optimize Eclipse STS Memory Settings
Spring Tool Suite (STS) versions based on Eclipse 3.x frequently stalled on 4 GB developer machines. Tweaking the STS.ini
JVM arguments prevents frequent full GCs and improves workspace responsiveness.
Suggested JVM Arguments
Edit STS.ini
and adjust the VM section with the following baseline values:
-Xms768m
-Xmx768m
-XX:MaxPermSize=256m
-Xms
/-Xmx
keep the heap size consistent, reducing dynamic resizing pauses.-XX:MaxPermSize
protects againstOutOfMemoryError: PermGen space
triggered by large plugin sets (pre-Java 8).
Additional Considerations
- On machines with more RAM, scale the heap to 1.5–2 GB and lift the PermGen ceiling accordingly.
- For Java 8+ distributions, replace
MaxPermSize
with-XX:MaxMetaspaceSize
or remove it entirely. - Combine memory tuning with the startup optimisations described in
content/english/post/faster-sts-startup.md
for best results.
Disclaimer
These settings target legacy STS releases. Modern Spring Tools embeds Eclipse 4.x with different memory characteristics—validate configuration changes in a staging workspace before rolling them out widely.