Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

OutOfMemoryError in the profiler UI

Can't find your answer? Please refer to documentation and demos, ask your question in forum, or contact support.

The profiler UI may run out of memory, e.g. while opening huge snapshots. "Huge" usually means several gigabytes, but the exact numbers vary in each particular case, depending on snapshot specifics.

  • Ensure you run the profiler UI on a 64-bit system.

    64-bit systems do not have the 2-4 GB memory size limitation of 32-bit systems. Snapshot of virtually any size can be successfully loaded and analyzed if there is enough physical memory.

  • Try tweaking the heap size of the profiler UI by changing the -Xmx value.

    The profiler UI is a Java program and stores its data in the Java heap. If you get the Out of memory error, please increase the -Xmx value to make the Java heap bigger. Depending on your OS, find the -Xmx setting in:

    • Since version 2017.02: <user home>/.yjp/ui.ini

    • Version 2016.02:
      • All platforms except for macOS: <user home>/.yjp/ui.ini
      • macOS: <Profiler Installation Directory>/Contents/Info.plist
    • Versions 2014-2015:
      • All platforms except for macOS: <Profiler Installation Directory>/bin/ui.ini
      • macOS: <Profiler Installation Directory>/Contents/Info.plist
    • Version 9.0-2013:
      • All platforms except for macOS: <Profiler Installation Directory>/bin/yjp.ini
      • macOS: <Profiler Installation Directory>/Contents/Info.plist
    • Version 8.0.x:
      • Windows: <Profiler Installation Directory>\bin\win32\yjp.ini
      • macOS: <Profiler Installation Directory>/Contents/Info.plist
      • other platforms: <Profiler Installation Directory>/bin/yjp.sh

    Don't forget to restart the profiler after changing -Xmx

    You may also get the Not enough virtual memory error. This means that some parts of the snapshot file could not be directly mapped to the virtual memory outside the Java heap. (The direct mapping is used for efficiency.)

    In this case please ensure that the system has enough virtual address space (swap file). Please also ensure you have not set the -Xmx value unnecessarily high.

  • Try to make snapshots smaller by running the profiled application with a lower Java heap limit (-Xmx setting of the profiled application). If the profiled application has a smaller heap, then the resulting snapshots will in general be smaller in size, will take less memory to load, and will allow faster analysis in the UI. Usually it's OK to run profiled applications with smaller heaps in order to perform performance analysis; optimizations based on such profiling will still be relevant when the same application runs with a bigger heap (e.g. in production).