Memory configuration
From PowerFolder Wiki
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 54 MB of memory. If the reconfiguration option is accepted, it will then be limited to 512 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
On operating systems other than Windows, PowerFolder will still automatically detect when the available memory limit is close to being reached, but will only display a simple warning.
PowerFolder is run with a command similar to java -jar PowerFolder.jar. This command will limit the maximum memory to 64 MB. To run PowerFolder with a higher memory limit, for example 256 MB, add -Xmx256m to the run command: java -Xmx256m -jar 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 -XX:MaxPermSize=368m 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=512 # Java Additional Parameters wrapper.java.additional.1=-Dsystemservice=true wrapper.java.additional.2=-XX:MaxPermSize=256m wrapper.java.additional.3=-XX:MinHeapFreeRatio=5 wrapper.java.additional.4=-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.

