Managing Picos with Topo
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 {
state=enabled
tags=[]
}
config {
classpath {
#classpaths...
}
jvmargs {
#jvmargs...
}
properties {
#properties... {
pico
#picos.. {
groups {
#groups...
}
}
}
}
}
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 ECs. 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 /wiki/spaces/MD82/pages/3770753 in the /wiki/spaces/MD82/pages/3768690.
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 ECs.
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 ECs. 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 System Properties.
This chapter includes the following sections:
- Creating Pico Configurations
- Updating Pico Configurations
- Removing Pico Configurations
- Viewing Pico Configurations and Attributes
- Resetting and Activating Pico Configurations