Memory
Kx Platform allows for the memory footprint of various components to be configured either during or post-deploy.
The main components and the their Memory configuration options are given for Linux and Windows.
Linux
Java components:
component | description | configuration |
---|---|---|
DocGen | Java process used to generate PDF documents as part of the reports framework | Kx Control Config |
Email Server | Java email server used by the Platform to send emails triggered by alerts | Kx Control Config |
Daemon | Java process used to start process instances on remote nodes | env.sh |
AppServer | Java Application server run under Tomcat. Provides the UI to the platform | delta.profile |
DocGen and Email servers
The DocGen and Email servers are started by Kx Control.
Their memory settings and min/max JVM values can be configured via a set of overrides of the DS_LAUNCH_COMMANDLINE_PARAMS
config parameter.
There is an override for each instance delivered with Platform. To change the memory characteristics edit the override for your instance and add the following:
Using the settings above, the ds_report_doc_generator_a
process will be launched with a minimum memory value of 512MB and a max memory value of 1024 for the Java Virtual Machine (JVM).
If the process is launched you should see the following in the log file:
Memory Setting found. Setting XMS to 512
Memory Setting found. Setting XMX to 1024
Daemon
The Daemon is delivered with Kx Control.
Its memory settings are configured in a file called env.sh
, which can be found as follows:
$ cd ~/kxinstall/delta-bin
$ source delta.profile
$ vi $DELTACONTROLJDAEMON_HOME/env.sh
The memory options relate to the Java Virtual Machine which runs the daemon.
JAVA_XMS=1024
-
Initial amount of memory (in megabytes) claimed by the JVM when it starts
JAVA_XMX=2048
-
Maximum amount of memory (in megabytes) the JVM is allowed to claim.
The values above can be altered using a command-line editor and the Daemon should be relaunched for the changes to take effect.
For example, if we set XMS
to 512 and XMX
to 1024 you should see the following.
$ cd ~/kxinstall/delta-bin
$ source delta.profile
$ cd bin
$ ./startDeltaControlDaemon.sh
$ vi $FD_LOGDIR/$DELTACONTROLDAEMON_LOGFILE
Java Memory Setting not found. Using default of XMS=512
Java Memory Setting not found. Using default of XMX=1024
AppServer
From release 4.0.2 onwards the memory allocation for the AppServer is controlled via the following environment variables in the delta.profile
, shown with their defaults
APPSERVER_JVM_INITIAL_MEMORY 1280 Initial and minimum heap size for JVM (MB)
APPSERVER_JVM_MAX_MEMORY 2048 Maximum heap size for JVM (MB)
JVM memory pre-sets
For production deploys of AppServer the recommend values for the JVM heap sizes are:
APPSERVER_JVM_INITIAL_MEMORY 1280
APPSERVER_JVM_MAX_MEMORY 8192
These can be achieved by adding the following to the end of either the bundle install config (scripts/install.config
) or a custom install config (passed in via -p
).
#============================================================
# NEW / CUSTOM CONFIGURATION
#============================================================
tomcat-install-type=2
Custom memory allocation
To tune the memory allocation yourself, add the following to the end of either the bundle install config (scripts/install.config
) or a custom install config (passed in via -p
).
#============================================================
# NEW / CUSTOM CONFIGURATION
#============================================================
app-server-jvm-initial-memory=2560
app-server-jvm-max-memory=5120
Windows
Java components:
component | description | configuration |
---|---|---|
DocGen | Java process used to generate PDF documents as part of the reports framework | Kx Control Config |
Email Server | Java email server used by the Platform to send emails triggered by alerts | Kx Control Config |
Daemon | Java process used to start process instances on remote nodes | startDeltaControlDaemon.bat |
AppServer | Java Application server run under Tomcat. Provides the UI to the platform | delta.profile.bat |
DocGen and Email servers
The DocGen and Email servers are started by Kx Control.
Their memory settings (min/max JVM values) can be configured via a set of overrides of the DS_LAUNCH_COMMNADLINE_PARAMS
config parameter.
There is an override for each instance delivered with Platform. To change the memory characteristics edit the override for your instance and add the following:
Using the settings above, the ds_report_doc_generator_a
process will be launch with a minimum memory value of 512MB and a maximum of 1024MB for the Java Virtual Machine (JVM).
If the process is launched you should see the following in the log file:
Memory Setting found. Setting XMS to 512
Memory Setting found. Setting XMX to 1024
Daemon
The Daemon is delivered with Kx Control.
Its memory settings are configured in the start script startDeltaControlDaemon.bat
.
The memory options relate to the Java Virtual Machine which runs the daemon.
JAVA_XMS=1024
-
Initial amount of memory (in megabytes) claimed by the JVM when it starts
JAVA_XMX=2048
-
Maximum amount of memory (in megabytes) the JVM is allowed to claim.
The values above can be altered and will be picked up by a full system restart.
AppServer
From release 4.0.2 onwards the memory allocation for the AppServer is controlled via the following environment variables in the delta.profile.bat
, shown wkith their default values.
APPSERVER_JVM_INITIAL_MEMORY 1280 Initial and minimum heap size for JVM (MB)
APPSERVER_JVM_MAX_MEMORY 2048 Maximum heap size for JVM (MB)
On Windows these variables can be altered in the delta.profile.bat
and will be picked up by a full system restart.