Evaluating the Impact of IntelliJ IDEA Memory Settings on IDE Performance
This article investigates how different IntelliJ IDEA memory configurations affect IDE speed and responsiveness by testing default, large, balanced, and sophisticated settings on a MacBook Pro with a monolithic Java project and microservices, measuring startup times, project loading, and JVM garbage collection using jstat.
The author discovered during a discussion that varying the memory settings of IntelliJ IDEA can significantly influence the IDE's speed and responsiveness. To evaluate this, a series of experiments were conducted on a MacBook Pro (2.3 GHz Intel Core i7, 16 GB RAM) using a large monolithic Java project (≈700 k lines, 303 Gradle modules) and two smaller microservice projects (≈10‑20 k lines each).
Test Scenario : The IDE was closed, memory options were applied via idea.vmoptions , the computer rebooted, unrelated projects closed, and then the IDE was launched to measure startup time, project loading time, and JVM garbage collection statistics using jstat -gcutil . The key metrics focused on GC event counts (YGC, FGC) and their durations (YGCT, FGCT).
jstat -gcutil Output Fields :
-gcutil Summary of garbage collection statistics.
S0: Survivor space 0 utilization.
S1: Survivor space 1 utilization.
E: Eden space utilization.
O: Old space utilization.
M: Metaspace utilization.
CCS: Compressed class space utilization.
YGC: Number of young generation GC events.
YGCT: Young generation GC time.
FGC: Number of full GC events.
FGCT: Full GC time.
GCT: Total GC time.Memory Configurations Tested :
Default (gray) :
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOopsBig (red) :
-Xms1024m
-Xmx4096m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseCompressedOopsBalanced (blue) :
-Xms2g
-Xmx2g
-XX:ReservedCodeCacheSize=1024m
-XX:+UseCompressedOopsSophisticated (orange) :
-server
-Xms2g
-Xmx2g
-XX:NewRatio=3
-Xss16m
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:ConcGCThreads=4
-XX:ReservedCodeCacheSize=240m
-XX:+AlwaysPreTouch
-XX:+TieredCompilation
-XX:+UseCompressedOops
-XX:SoftRefLRUPolicyMSPerMB=50
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-eaResults :
IDE startup time remained constant (~10 seconds) across all settings.
Loading the large monolithic project was fastest with the "Big" configuration; the default setting took roughly three times longer.
GC activity under the default setting was excessively high, with many Full GC events causing severe slowdown.
When opening the two microservice projects, the sophisticated configuration performed best, while the default lagged behind.
Refreshing the monolithic project caused the IDE to crash under the default setting, indicating insufficient memory.
Overall, larger Xmx values (2‑3 GB) yielded the best balance between performance and memory consumption.
Conclusion : Adjusting IntelliJ IDEA's memory allocation can markedly improve IDE performance, especially for large codebases. A practical recommendation is to set Xmx between 2 GB and 3 GB for most scenarios, while using tools like jstat and jvisualvm to fine‑tune JVM options further.
Architect's Tech Stack
Java backend, microservices, distributed systems, containerized programming, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.