https://kotlinlang.org logo
#android-studio
Title
# android-studio
s

Sergio C.

12/01/2021, 4:09 PM
Is there a way to increase AS memory beyond 4096MB? How can we find out the best setting?
w

wbertan

12/01/2021, 4:22 PM
Help > Edit Custom VM Options
Mine for example:
Copy code
# custom Android Studio VM options, see <https://developer.android.com/studio/intro/studio-config.html>
-Xmx8192m
-XX:MaxPermSize=4096m
-XX:ReservedCodeCacheSize=2048m
s

Sergio C.

12/01/2021, 5:25 PM
8GB heap size.
Do you notice any diference compared to the default values?
Copy code
XX:MaxPermSize
looks like it was removed in Java 8
w

wbertan

12/01/2021, 5:30 PM
Could be, as I've copying this around for a quite some time. 😬 The performance, well, for me at least seems better than not setting it. Especially when I usually have 2 or 3 Android Studio open 👀 Everything is still fine and works reasonable quick.
s

Sergio C.

12/01/2021, 5:34 PM
sometimes I have many projects open simultaneously too, the max heap size is applied to each AS instance as I understand. right?
8x(Many AS) can be a lot of memory
need to try it to see what happens.
w

wbertan

12/01/2021, 5:37 PM
No 🤔 Here it is shared, they all show the same amount of memory in the corner, and if I clear in one, show the decrease in all others too
s

Sergio C.

12/01/2021, 5:49 PM
looks like so
opened 4 projects and max used memory was bellow 4GB
lets bump it up
11 Views