Large Eclipse p2 folder with many .profile or .profile.gz files found

Technote (troubleshooting)


Problem(Abstract)

When you look in the p2 folder in your Eclipse installation directory or in your user home directory, you see many files with extensions .profile or .profile.gz.

Symptom

The p2 folder is

p2/org.eclipse.equinox.p2.engine/profileRegistry/bootProfile.profile/

The size might be larger than 100MB. The folder occupies more and more hard disk space after each installation change. That means:

  • installation,
  • uninstallation,
  • update of existing plugins.

Files with the .profile or .profile.gz extension can be 30MB each. Eclipse creates them after each installation change.


Cause

p2 stores in the profile files the list of previous installation states. Each installation change adds a new entry. That means a new .profile or .profile.gz file.

Diagnosing the problem

Navigate to your product installation main folder or in case of multi-user installation to your user home directory. Then list all files inside the following folder.

p2/org.eclipse.equinox.p2.engine/profileRegistry/bootProfile.profile/


If you see many files with the .profile or .profile.gz extensions of more than 10 MB, this issue applies to you.


Resolving the problem

A manual solution and an automated solution in form of an Eclipse plug-in are available.


Manual solution

Remove all .profile and .profile.gz files except the latest one. These files have a name with the system time. Therefore a bigger number corresponds to the newer profile.



Automated solution

You can also use the Eclipse plug-in below. This limits the number of stored profile files to the n latest ones where n is a parameter that you need to define.

NOTES

  • profile files are necessary to perform a 'Revert' operation, because they store the configuration. You will not be able to revert to any previous configuration, for which you deleted the profile file.
  • Starting from Service Pack 7.5.5.2 all new files have the .profile.gz extension and are actually compressed .profile files. The compression ratio is about 90%.


A. Plug-in installation instructions:

      1. Stop your Eclipse application.

      2. Copy the attached jar to the folder installation folder\dropins.


        Make sure to select the appropriate jar version for your Eclipse application.
        • for Eclipse 3.4.x use
          com.ibm.support.p2profilelimiter_1.1.0.r342_201204261200.jar

        • for Eclipse 3.6.x use
          com.ibm.support.p2profilelimiter_1.1.0.r362_201204261200.jar

      3. Add the following argument to the Java virtual machine inside eclipse.ini:

        -DmaxProfilesNumber=3

        "3" is just an example. You need to specify how many profiles you want to keep.


      4. Start your Eclipse application.

B. Execution
      The plug-in will delete unnecessary profiles, when you close Eclipse or your Eclipse application. Examples are: Rational Application Developer for WebSphere Software, Rational Software Architect.

      If you want to know exactly which files the plug-in will delete, consider the following steps before you start your Eclipse application.

      1. Create a .options file inside the folder where you have your eclipse.exe executable and put the following line in it.

        com.ibm.support.p2profilelimiter/debug=true

      2. Run your Eclipse application using the following command:

        eclipsec.exe -debug -consolelog
      3. This will produce additional output from the plug-in that will inform you what happened and which files will be deleted when you close your Eclipse application.



C. Technical overview
      The code that defines deletion of profile files is packaged inside the appropriate jar file. The reason why there are two separate plug-ins for Eclipse 3.4.x and 3.6.x is that the p2 mechanism that defines where and how to store profile files was refactored after Eclipse 3.4.2 and the plug-in appropriate for 3.4.2 will not work with 3.6.2.

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Elite Support for Eclipse
Eclipse SDK

Software version:

3.4

Operating system(s):

Linux, Windows

Reference #:

1427048

Modified date:

2012-04-26

Translate my page

Machine Translation

Content navigation