Memory configuration

From PowerFolder Wiki
Jump to: navigation, search

Contents

Java memory

PowerFolder is a Java application. Java imposes a maximum limit to the amount of memory an application can use. This is a safeguard that prevents an application from consuming all of a computer's resources.

PowerFolder normally runs perfectly well with the default memory limit. However, if many folders with many files are being managed, this limit can be exceeded and PowerFolder will then perform poorly.

It is possible to adjust this memory limit.

The memory use is heavily influenced by the number of shared files, the actual total size does not matter.

Windows

On a Windows system, PowerFolder will automatically detect when the available memory limit is close to being reached, and will display a warning dialog. This dialog provides an option for PowerFolder to automatically reconfigure to a higher memory limit. Usually this new limit will then be sufficient.

If you are running Windows Vista, you may need to run PowerFolder as an administrator for the reconfiguration to work. To start PowerFolder in administrator mode, right-click on the PowerFolder start icon and select the "Run as administrator" option.

Manual configuration

By default, PowerFolder is limited to 512 MB of memory. If the reconfiguration option is accepted, it will then be limited to 1024 MB. The memory limit is recorded in a configuration file, PowerFolder.l4j.ini. The -Xmx entry defines the upper memory limit, and this can be manually edited to any desired value, e.g. -Xmx1024m.

Other operating systems (e.g. Mac OS X)

On operating systems other than Windows, PowerFolder will also automatically detect when the available memory limit is close to being reached, but it will display a simple warning only.

To increase the memory PowerFolder can be run via command line (console). To run PowerFolder with a higher memory limit, for example 1 GB, run the following command in the PowerFolder installation directory: java -Xmx1G -jar PowerFolder.jar.

Mac example:

java -Xmx1G -jar /Applications/PowerFolder.app/Contents/Resources/Java/PowerFolder.jar

Current usage

The PowerFolder About dialog shows the maximum and currently used memory.

Large installation

On large PowerFolder installations (more than 250.000 shared files) these commandline settings may still not be sufficient. Please also add the parameter -Xmx2g to increase a different memory bound within java. This parameter can also be added to the PowerFolder.l4j.ini file on Windows systems.

System service

If you encounter crashes caused by hitting the memory limit please edit the file "wrapper.conf" located at

  • Windows XP: C:\Documents and Settings\All users\ApplicationData\PowerFolder\service
  • Windows Vista/7: C:\Users\All Users\PowerFolder\service

And make sure it contains the following lines:

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024

# Java Additional Parameters
wrapper.java.additional.1=-Dsystemservice=true
wrapper.java.additional.2=-XX:MinHeapFreeRatio=5
wrapper.java.additional.3=-XX:MaxHeapFreeRatio=10

You can edit those lines to fit your needs.

Tips to reduce memory use

  • Enabled instant auto-cleanup of uploads and downloads.
  • Reduce the number of files in your folders.
  • Split up big folders into smaller ones.
  • Don't sync/setup folders that do not actually change.
  • Maintain the folder database (Settings/Maintain database). Turn on debug logging first.

Related documentation

Personal tools
Navigation