Skip to end of banner
Go to start of banner

Configuring memory limits

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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 Vista, 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 1024 MB.


Overview:

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:

PowerFolder.l4j.ini
-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

(info) 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:

Running the client from command line on Mac OS X
java -Xmx1G -jar /Applications/PowerFolder.app/Contents/Resources/Java/PowerFolder.jar

Manual memory limit configuration on Linux operating systems

(info) 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:

Adjusting the memory limit in the PowerFolder-Client.sh 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 XP/2003/2003 R2: C:\Documents and Settings\All users\ApplicationData\PowerFolder\service
  • Windows Vista/7/8/2008/2008 R2/2012: C:\ProgramData\PowerFolder\service

To increase the memory limit, please adjust the following line to your needs:

Adjusting the memory limit in the wrapper.conf file
wrapper.java.maxmemory=1024

Other tips to reduce memory usage

To reduce memory usage:

  • Enable 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.
  • Cleanup the folder database.
  • No labels