Server - Memory Configuration
When installations start growing after a while due to more users or more folders and files in those folders, it may be necessary to add more physical memory to the system. Thumb rule: 1 GB of memory per 1 million managed files.
PowerFolder Server is running inside a Java Virtual Machine (JVM), which has an own memory configuration. After adding more physical memory to the host system, there are some changes necessary to make PowerFolder Server benefit from this change. If there are no other major services running on the system, the majority of the available memory can be assigned to the JVM. However there should be some memory left for the operating system, background services as well as disk read/write caching.
Assigning more memory to the Java Virtual Machine (JVM)
Estimating and setting suitable memory settings on Windows
To assign more memory to the Java virtual machine on Windows systems, it is necessary to change the wrapper.java.maxmemory
parameter in the wrapper.conf
file, which resides in the PowerFolder Server installation directory.
# Maximum Java Heap Size (in MB) wrapper.java.maxmemory=2048
The wrapper.java.maxmemory
 parameter shown above sets the maximum amount of physical memory available to the JVM. Below there is a list of examples how to scale the -Xmx
 parameter.
Examples:
Physical Memory | Suggested Settings |
---|---|
1 GB | -Xmx=512m  Please also set (decrease) the -Xms parameter to 128m. |
2 GB | -Xmx1g |
4 GB | -Xmx2g |
6 GB | -Xmx4g |
8 GB | -Xmx6g |
... | ... |
 Please note that the above values are just recommendations. You may need to fine tune them if PowerFolder runs out of memory (increase the values) or doesn't start (decrease the values), because there is not enough free memory left.
Estimating and setting suitable memory settings on Linux
To assign more memory to the Java virtual machine on Linux systems, it is necessary to change the -Xmx
 parameter in the PowerFolder-Server.sh
 startup script. The script will automatically detect if it's running on a 32-bit or 64-bit during run time and will then start the Java virtual machine with different values for the memory configuration. The PowerFolder-Server.sh script can be found in the installation directory of PowerFolder Server. It includes the defaults below:
JAVA_MEM="-Xms256m -Xmx1g -XX:NewRatio=8 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20"
JAVA_MEM="-Xms256m -Xmx3g -XX:NewRatio=8 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20"
The -Xmx
parameter shown above sets the maximum amount of physical memory available to the JVM. Below there is a list of examples how to scale the -Xmx
parameter.
Examples:
Physical Memory | Suggested Settings |
---|---|
1 GB | -Xmx=512m  Please also set (decrease) the -Xms parameter to 128m. |
2 GB | -Xmx1g |
4 GB | -Xmx2g |
6 GB | -Xmx4g |
8 GB | -Xmx6g |
... | ... |
 Please note that the above values are just recommendations. You may need to fine tune them if PowerFolder runs out of memory (increase the values) or doesn't start (decrease the values), because there is not enough free memory left.
Running PowerFolder Server on 64-bit systems with less then 4GB RAM
As mentioned before the PowerFolder-Server.sh
startup script will automatically set different memory settings if a system is either 32-bit or 64-bit. Since it assumes that 64-bit systems always have at least 4GB of RAM available, it will set the memory configuration of the JVM to a maximum of 3GB. In case of a 64-bit system with less than 4GB RAM, this will most probably cause the JVM to shutdown shortly after it has been started with the following error message:
Error occurred during initialization of VM Could not reserve enough space for object heap
In that case please adjust the -Xmx parameter to match your amount of free memory plus some spare memory to be safe.
Estimating and setting suitable memory settings on Mac
 For the configuration and increase of the memory under macOS, PowerFolder should run as a application
After the PowerFolder running as a application please follow the following steps for the increase in the memory only if needed:
- Left-Click on PowerFolder icon or options on the topÂ
- Click on Package content
- In the contents open the Info.plist in the text editor
- Now change the following parameter as per need:
<string>-Xmx1g</string>
- Start the client new.