Currently Being Moderated

How-to: Reporting PhpStorm/WebStorm performance problems and taking CPU/memory snapshots


Created on: Jul 11, 2011 12:32 PM by Alexey Gopachenko - Last Modified:  Nov 25, 2013 2:19 PM by Serge Baranov

This document is out of date, the new version is available at

Common solutions for PhpStorm/WebStorm performance problems

Note: instructions are the same for both IDEs. Just replace "PhpStorm" with "WebStorm" where appropriate.


Before capturing and providing the CPU snapshot, please be aware of the following known issues (and possible solutions):

  • Antiviral tools monitoring project and caches directories (~/.WebIDEXX).  Exclude PhpStorm project/library/caches directories from the monitor.
  • PhpStorm caches on the slow or network drive,  check that ~/.WebIDEXX is on the local drive, adjust the  location in PhpStorm_HOME\bin\ if necessary (but be aware  of the first item in this list).
  • Project files/SDK installation on a network drive. This may work for you for some time, but is officially unsupported. Move them to your local drives or use "New project from existing files" wizard to create a local copy and set up auto sync. Note that you should always open that local copy afterwards, not the original remote location.
  • Low free system memory and therefore swapping. Close other applications, free as much memory as possible. Install additional RAM, decrease the heap.
  • Very  large files (>10 000 lines). Refactor them if possible. Disable  inspections per file to save some resources using the Hector icon in the  status bar.
  • Heavily fragmented partition and full MFT, see the related blog post. Drive defragmentation can make PhpStorm much faster, we have proven it on our development machines.
  • Heavy disk activity caused by another applications, such as torrent clients, file servers.  One thread can read data from the modern HDD at ~100 MB/sec. If there  are 2 or more applications reading/writing to the same HDD at the same  time, performance will drop to 2-3 MB/sec. Check that there are no  processes constantly reading/writing to the disk. On Windows you can use  SysInternals Process Monitor or Process Explorer.
  • External process modifying or generating lots of files/logs into the project directories. Synchronization will take lots of time in this case. Exclude such directories from the project.
  • When using version control, if there are many unversioned files (thousands), Changes view update may be slow. Exclude such directories  from the version control in Settings | Version Control | Directory  Version Control Settings by adding the directory with such files to the  list and setting VCS to NONE.


Automatic Thread Dumps Logging

If  the UI of PhpStorm is unresponsive for more than 5 seconds, it starts  writing thread dumps to the logs directory. If you've encountered a  situation of PhpStorm unresponsiveness or deadlock, please find the  threadDumps-xxx directory from the session in which you've experienced  the problem and send the contents to


On Windows and Linux, the logs directory can be found at:





On Mac OS X, the logs directory can be found at:




CPU snapshot capturing instructions

If you have a performance problem not related to the issues mentioned above, please contact and provide the following information:

  • You hardware configuration (CPU, Memory, HDD)
  • OS, free memory when you start PhpStorm, PhpStorm heap settings, file system, PhpStorm caches location (if modified)



  1. If  you are using PhpStorm on Windows under a 64-bit JVM, please follow instructions below. Otherwise please proceed to the following step.


    Please obtain the library(64-bit  for 64-bit JVM) version from the YourKit Java Profiler distribution (you need Linux .zip download of 8.x version containing library versions for different operating systems:  Linux, Mac, Solaris, Windows). You will find libraries in "bin" folder  of the distribution. Copy (or replace) yjpagent library in PhpStorm_HOME\bin with the appropriate version. Use 8.x YourKit version for PhpStorm, otherwise toolbar buttons will not appear!


  2. Open PhpStorm_HOME/bin/PhpStorm.exe.vmoptions (PhpStorm.vmoptions on Linux), add the following line at the bottom:



    On Mac OS X open Info.plist located in /Applications/, find the following:



    <string>-Xms16m -Xmx192m -XX:MaxPermSize=120m -Xbootclasspath/p:../lib/boot.jar -ea</string>


    Modify the string tag by adding -agentlib:yjpagent option, like:


    <string>-Xms16m -Xmx192m -XX:MaxPermSize=120m -Xbootclasspath/p:../lib/boot.jar -ea -agentlib:yjpagent</string>



Start PhpStorm and you should notice 2 new toolbar buttons: one for taking CPU snapshot,  another one for Memory snapshot. How to capture proper CPU snapshot:


  1. Press the CPU button to start recording perfomance
  2. Perform the  actions which take a lot of CPU resources on your machine, at least for 30 seconds. Focus on problematic stuff only
  3. When finished, press this button again to stop recording and save the snapshot


Then submit an issue to PhpStorm/WebStorm issue tracker and attach the zipped snapshot file to it. In the e-mail please also describe what you were doing in detail. If you can reproduce the problem in a small project, please also provide one.


Memory snapshot


In  case of memory related issues (memory usage goes high, garbage is not  collected, etc) please use the Memory snapshot button in the menu near  the CPU snapshot button. If it's not possible to get the snapshot  because of the application crashing with OutOfMemory errors, please add  the


option to the PhpStorm JVM options(the same place as for "-agentlib:yjpagent" option in  above CPU snapshot section). On the next OOM error the .hrpof dump will  be produced and saved by the JVM (usually in the application working  directory which is PhpStorm_HOME\bin).


The memory snapshots should be uploaded to our FTP site:


After uploading the snapshot, please notify us by e-mail or file a YouTrack issue and specify the name of the uploaded snapshot file.

Average User Rating
(0 ratings)

There are no comments on this document

More Like This

  • Retrieving data ...

More by Alexey Gopachenko