Page History
Servoy is built using Java technology and as such the memory management for Servoy is basically Java Memory management. This chapter describes the basics of Java Memory management, which will be sufficient for all but the most extensive and complex deployment scenario's.
Stoc |
---|
Java Memory management introduction
...
The Smart Client runs on the client machine, not on the Servoy Application Server like the other Servoy Clients, like the Web Client, Headless Client or Batch Processor. The Smart Client is only registered with the Application Server and thus consumes far less memory on the Application Server compared to the other Servoy Clients. See #Smart Smart Client Memory management for more information on configuring the Memory settings for Smart Clients specifically.
...
When using the Service component to automatically launch the Servoy Application Server when the machine on which it is installed is booted, the memory settings for the Application Server can be configured inside {serverInstall}\application_server\service\wrapper.conf by altering the "wrapper.java.maxmemory" setting:
Code Block |
---|
wrapper.java.additional.4=-XX:MaxPermSize=128m
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=32
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1280
|
...
When starting the Servoy Application Server manually, either through {serverInstall}\application_server\servoy_server.bat/.sh or {serverInstall}\application_server\terracotta/start_servoy_clustered.bat/.sh, the memory settings for the Application Server can be configured inside the .bat/.sh, by altering the -Xmx value:
Code Block |
---|
java ... -Djava.awt.headless=true -Xmx1280m -Xms64m -XX:MaxPermSize=128m .....
|
Note | ||
---|---|---|
| ||
When specifying the -Xmx and -Xms values, the following needs to be taken into account:
In a default Servoy Application Server installation, the Maximum Heap Space value (-Xmx) is set to 1280m. For servers that have limited memory, this value could be too high, resulting in the following error when trying to start the server:
Either lower the -Xmx value or make sure that more memory is available for the Java process on the server, by closing other applications or adding more physical memory to the server. |
...
Setting | What is does | Comment |
---|---|---|
servoy.initialClientHeap | Sets the Initial Heap Space size |
|
servoy.maxClientHeap | Sets the Maximum Heap Space size |
|
servoy.vmClientArgs | optional arguments that can be send to the Smart Client's JVM | Set to "-XX:SoftRefLRUPolicyMSPerMB=3600000" by default: this setting improves performance |
...