2.4 Managing Pico Configurations
This section describes how to create, update, remove, and view pico configurations.
Each pico configuration consists of a set of attributes, including templates, system properties, JVM arguments, and classpaths. When you change these attributes in a configuration, the corresponding pico instance must be restarted.
A configuration may also include "settings" attributes. Unlike e g properties, this type of attribute may contain array values and changes do not require restart of pico instances.
{
template=<template name space>.<template file name>
settings {
pico-groups=[]
state=enabled
tags=[]
}
config {
classpath {
#classpaths...
}
jvmargs {
#jvmargs...
}
properties {
#properties...
}
}
}
Settings
At the time of writing, there are three available settings:
state
- If set to disabled, this pico will not be started by the system commandtags
- Add tags to group pico instances in the mzsh commandsystem
.pico-groups
- This attribute is applicable for EC/ECSAs. Add pico groups to reference multiple pico instances as an entity in a workflow. You can only reference existing EC groups in thepico-groups
attribute. For information about how to create an EC group, see 6.9 Pico Manager in the Desktop User's Guide.
Classpaths
The default classpath attributes that are set in the pico configuration of the Platform. Agents that are installed on the system may require that additional classpaths are set in the pico configuration of EC/ECSAs.
JVM Arguments
A number of JVM arguments controlling the memory usage are set in the default template standard
, which is inherited by all other default templates.
config { ... jvmargs { args=[ "-server" ] maxDirect=[ "-XX:MaxDirectMemorySize=4096M" ] maxMetaspace=[ "-XX:MaxMetaspaceSize=196M" ] xms=[ "-Xms64M" ] xmx=[ "-Xmx256M" ] } ... }
You can add additional JVM arguments in a custom template or override the default values in your pico configurations.
Each of the JVM arguments in the template has unique label. This makes it possible to edit individual JVM arguments via the mzsh command topo
.
It is highly recommended that you follow this pattern and consistently use the same labels in all configurations. Omitting or mixing labels may lead to unpredictable results. For instance, the following labels are used in the standard
template.
Label | JVM Argument |
---|---|
maxDirect | MaxDirectMemorySize |
maxMetaspace | maxMetaspace |
xms | Xms |
xmx | Xmx |
If you set set any of the above JVM arguments in a custom template, but with different labels. Pico instances may start with conflicting JVM arguments.
mzsh topo set topo://container:<container>/pico:<pico>/obj:config.jvmargs \ '<label>: ["argument1","argument2"]'
Example - Setting JVM arguments
mzsh topo set topo://container:main1/pico:platform/obj:config.jvmargs \ 'xmx:["-Xmx256M"] xms:["-Xms64M"] maxMetaspace:["-XX:MaxMetaspaceSize=196M"] maxDirect:["-XX:MaxDirectMemorySize=4096M"] args : ["-server"]'
If you have a large block of APL code, e g 300 lines or more, add the JVM argument -XX:DontCompileHugeMethods
to pico configurations of EC/ECSAs. This causes the the JIT compilation to take effect:
mzsh topo set topo://container:<container>/pico:<pico>/obj:config.jvmargs \ 'dontCompileHugeMethods:["-XX:DontCompileHugeMethods"]'
System Properties
For information about the available system properties, see 2.6 System Properties.
Default Pico Configurations
When you install the Platform Container, the pico configuration for the Platform and the SC psc1
are created by default.
If you set the property install.str.config-script
to str-templates/basic.sh
in install.xml
during the installation, the following pico configurations will be created in the STR:
Pico Name | Description |
---|---|
ec1 | EC based on the template standard-ec |
ecsa1 | ECSA based on the template standard-ecsa |
sc1-sc3 | SCs based in the template standard-sc |
zk1-zk3 | SCs based in the template standard-sc |
The script referenced above is also available in the Platform container after the installation, in the directory MZ_HOME/scripts/str-templates
.
You can create new pico configurations based on the standard-templates or you can create your own templates. For further information about creating templates, see 1.4.2 STR File Structure.
This section includes the following subsections:
2.4.1 Creating Pico Configurations
2.4.2 Updating Pico Configurations
2.4.3 Removing Pico Configurations