How can I increase the memory heap in pycharm

23

7

I am using pycharm and its memory shown at bottom right corner is 750M. I could not find any setting where I can increase that. Where do I increase that memory. I am using version 3.4.

I searched a lot but could not find from Google as well

Mirage

Posted 2015-05-25T10:30:33.933

Reputation: 2 563

Official doc: https://www.jetbrains.com/help/pycharm/2017.1/tuning-pycharm.html#d335379e266

– Stephan Schielke – 2017-06-01T18:17:44.570

Answers

19

Under the /bin directory of your pycharm installation, there is a file pycharm.vmoptions. You can use this to customize the options that are passed to the JVM. The maximum heap size should be given by

-Xmx750m

There is a list of memory options in this blog post

pyrocrasty

Posted 2015-05-25T10:30:33.933

Reputation: 1 332

@slashdottir: thanks, link replaced with archive.org copy – pyrocrasty – 2016-11-29T20:13:22.163

I had to modify it and the vmoptions file is located in the user path, in a pycharm[version].exe.vmoptions file. This one seems to be the specific one your system uses when pycharm is installed (I am talking of Community Edition 2016.3) – Dani bISHOP – 2016-12-09T07:09:36.470

30

  1. Help->Find Action->(type "VM Options")->(Click)"Edit Custom VM Options"
  2. Pycharm (2016.2) will open the appropriate vmoptions file (pycharm.vmoptions or pycharm64.options) in the editor before you.
  3. Change -Xmx750m to -Xmx1024m, or whatever size you want. Save it.
  4. Restart Pycharm (File->Exit etc.)

Official 'Increasing memory heap' documentation is here

John Mee

Posted 2015-05-25T10:30:33.933

Reputation: 838

1easy and clean solution – Mehedi – 2017-08-09T03:54:49.327

hi! what if i want to give more than 1024? what other # can i use? or... can you let me know waht this number is called? so i can google it :/ thank you! – alwaysaskingquestions – 2018-02-23T19:00:34.063

1@alwaysaskingquestions You can change the number to whatever amount of memory you decide to dedicate to it. If you click on the link you'll see that it's called the "Maximum heap size". – John Mee – 2018-02-26T02:37:15.740

0

Go to /JetBrains/PyCharm 5.0.1/bin

There will be two files in case of 64bit version. pycharm.vmoptions and pycharm64.vmoptions.

Increase the Heap and Perm Size

-Xms256m

-Xmx1024m

-XX:MaxPermSize=512m

Note: You can increase it according to your system configuration. So do it wisely: if PyCharm doesn't open for you, it means that you over-specified the memory. I thought it wasn't working for me because of a pending restart, but wasn't working after restart either. Just open the 'vmoptions' files and bring down the values iteratively until PyCharm launches.

Siva-Dev-Wizard

Posted 2015-05-25T10:30:33.933

Reputation: 101

0

Rather than manually searching for the right files, you can (at least in PyCharm 5) now just search for or navigate to "Edit Custom VM Options" and it will create and open a default vmoptions file for you, as described in https://www.jetbrains.com/pycharm/help/tuning-pycharm.html. Then,

To increase PyCharm heap size, ... modify the -Xmx setting.

EDIT: I don't know why, but this process created a pycharm64.vmoptions file for me and that didn't actually change the heap size (as indicated in the bottom right "Show memory indicator"). I actually had to rename that file to pycharm.vmoptions for it to work.

Pat

Posted 2015-05-25T10:30:33.933

Reputation: 641