This article explains the memory usage and configuration of the client. 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 the client 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.
Automatic memory limit detection and configuration on Windows operating systems
On a Windows system the client 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 the client to automatically reconfigure to a higher memory limit. Usually this new limit will then be sufficient. If you are running Windows, you may need to run PowerFolder as an administrator for the reconfiguration to work. To start the client in administrator mode, right-click on the client program shortcut or executable icon and select the Run as administrator option.
By default the client is limited to 512 MB of memory. If the reconfiguration option is accepted, it will then be limited to 2048 MB(32bit) or 8192(64bit).
Manual memory limit configuration on Windows operating systems
The memory limit is written into the configuration file PowerFolder.l4j.ini
residing in the client installation directory. It's contents should look similar to the following example:
-Xms16m -Xmx512m -XX:NewRatio=8 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10
The -Xmx
entry defines the upper memory limit. This can be manually adjusted to any desired value, e.g. -Xmx1024m
.
Manual memory limit configuration on Mac OS X operating systems
On Mac OS X the client will also automatically detect when the available memory limit is close to being reached, but will only display a simple warning about it.
To increase the memory the client can be run via command line (console). To run the client with a higher memory limit, for example 1 GB, run the following command in the client installation directory: java -Xmx1G -jar PowerFolder.jar
. Example:
java -Xmx1G -jar /Applications/PowerFolder.app/Contents/Resources/Java/PowerFolder.jar
Manual memory limit configuration on Linux operating systems
On Linux the client will also automatically detect when the available memory limit is close to being reached, but will only display a simple warning about it.
To increase the memory the bash script used to start the client can be adjusted to use a higher memory limit. The bash script to start the client usually resides in the directory /usr/share/PowerFolder or the directory where you've extracted the client and is called PowerFolder-Client.sh. Open the file in your favorite text editor, adjust the -Xmx parameter in the line below to your needs and save the file:
JAVA_MEM="-Xms64m -Xmx1g -XX:NewRatio=8 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20"
Manual memory limit configuration when running as a system service
If you encounter crashes caused by hitting the memory limit please edit the file wrapper.conf
located in
- Windows 7/8.1/2008/2008 R2/2012:
C:\ProgramData\PowerFolder\service
To increase the memory limit, please adjust the following line to your needs:
wrapper.java.maxmemory=1024
Other tips to reduce memory usage
To reduce memory usage:
- Enable instant auto-cleanup of uploads and downloads.
PowerFolder client -> click on a folder -> Transfers -> auto-cleanup interval -> Immediately - 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.
- Cleanup the folder database.
PowerFolder client -> click on a folder -> Settings -> Cleanup Database - Deactivate the P2P function in client. Configuring connection modes
To perform the tasks above it is required to set up the client to Expert Mode.