This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
15 Replies Last post: Feb 21, 2013 7:24 PM by And Finally  
And Finally Newbie 30 posts since
Jul 5, 2011
Currently Being Moderated

Feb 13, 2013 7:16 PM

PHPStorm chowing memory

I'm running a single project in PHPStorm on OSX - there's a fair amount of files as I have two other branches of my code in the project as well as the one I mostly work on. The file size of the 18,600 files in my project directory is 778 MB. I'm finding that PHPStorm gradually eats up more and more of my RAM, so I have to restart it at least once a day. On restart the memory consumption starts at about 200MB but steadily climbs up to about 360 and seems to stablise there. Something must be causing it to creep up more slowly through the day. Before restart my activity monitor was telling me it was using 915 MB, and PHPStorm status bar was reporting that it was using 140 MB of 791 MB.

 

Is there any setting I can use to keep the memory usage down, or any measures anybody can recommend? I guess you're going to say I should reduce the number of files in my project folder?

 

phpstorm-ram.gif

Kirill Safonov JetBrains 584 posts since
Jul 9, 2009
Currently Being Moderated
Feb 13, 2013 8:02 PM in response to: And Finally
Re: PHPStorm chowing memory

Could you please take a memory dump? (click toolbar button at the right), upload it to ftp.intellij.net/.uploads and give ne the file name?

 

Thanks,

Kirill

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 15, 2013 12:29 PM in response to: And Finally
Re: PHPStorm chowing memory

Actually it looks like PHPStorm mostly needs less memory than the virtual machine has allocated in the OS. You can try to reduce the Xmx value in idea.vmoptions (their location is described at http://stackoverflow.com/questions/13578062/how-to-increase-ide-memory-limit-in-intellij-idea-on-mac/13581526#13581526), I guess a value like 128m or 256m or anything in between should be sufficient for you. Note that this may cause PHPStorm to be slower and less responsive at times. If you feel that, just increase the Xmx value until you find a perfect one.

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 15, 2013 7:31 PM in response to: And Finally
Re: PHPStorm chowing memory

Sorry, didn't notice you have an older version. Please try Info.plist file in the PHPStorm application folder. It should contain Xmx inside some of the Java properties.

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 15, 2013 7:41 PM in response to: And Finally
Re: PHPStorm chowing memory

Yes. Try changing Xmx parameter to something like -Xmx150m, not sure in which property. Perhaps in both to be sure.

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 21, 2013 2:19 PM in response to: And Finally
Re: PHPStorm chowing memory

Not necessarily all, but apparently it needs more. You could capture another snapshot in these circumstances for us to find out what this memory is needed for. And you can just try a higher value.

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 21, 2013 7:13 PM in response to: And Finally
Re: PHPStorm chowing memory

This snapshot doesn't seem to be taken during high memory usage. You can enable -XX:+HeapDumpOnOutOfMemoryError as described at http://devnet.jetbrains.com/docs/DOC-192 and the next time PhpStorm runs out of memory there'll be an *.hprof file generated. We can look at it, too.

More Like This

  • Retrieving data ...