Configuring RDS
The RDS configuration file is located at <SWD>/resources.cfg. This file sets up RDS with configuration information which includes connections to license monitoring and definition of limit resource maps, license resource maps, and mapping resource maps. In summary, the resources.cfg file will give you the ability to configure what classic resource management has configured in the Tcl based resources.tcl file. The Attribute Value Stream (AVS) format and schema for RDS resources.cfg is described Configuration File Format.
- For advanced license scheduling, Accelerator needs to link to at least one running RDS-enabled Monitor instance. See Server Configuration Parameter to Configure Accelerator for RDS.
- The LICENSE_MONITORS attribute in resources.cfg specifies the Monitor instance that will be linked to Accelerator.
- A common way to specify a Monitor instance in Accelerator's
resources.cfg file is with the following simple
resources.cfg
content:
{ LICENSE_MONITORS = [ { NAME = "monitor_name" } ], RESOURCE_MAPS = [ { FEATURES = "*" ] }
This specification will often be enough. However, if Monitor is not using the same registry as Accelerator, then Monitor needs the EVENT_PORT parameter declared. The selected/specified port will be placed in the LM's registry file so that normally only the LM name is needed to establish the RDS to LM connection. For example:% lmmgr start -eventport <port number>
- The RESOURCE_MAPS attribute structure in resources.cfg uses explicit feature names and wildcard patterns to specify exactly what license features to import into Accelerator for the purpose of advanced license scheduling.
- Full details for configuration syntax of LICENSE_MONITORS and RESOURCE_MAPS in resources.cfg are shown in Configuration File Format.
Resources.cfg
The Resource Data Service (RDS) capability is Accelerator's next-generation resource
management. The new RDS service is configured by a new configuration file
--resources.cfg
-- in the Server Working Directory. The new
configuration file uses an Attribute Value Stream (AVS) syntax, a JSON-like syntax
which is quite different from the Tcl format of the resources.tcl
file used to configure classical Accelerator resource management. This document will
guide you in configuring RDS and in translating an existing
resources.tcl
file into a properly formatted
resources.cfg
file.
Server Configuration Parameter to Configure Accelerator for RDS
When you have an RDS-enabled Monitor instance running, you are ready to configure Accelerator for RDS.
Within Accelerator, when the rds.enable
server configuration
parameter is set to "1", Accelerator will be RDS-enabled, and a new server thread
named RDS will activate in place of the classic vovresourced
daemon. The RDS thread will process the resources.cfg
file, which
can be written according to the following instructions.
Edit/create the SWD/resources.cfg file. Substitute your LM name
for licmon
below if different:
{
LOG_LEVEL = 5,
LICENSE_MONITORS = [
{ NAME = "licmon", }
],
RESOURCE_MAPS = [
{ FEATURES = "*" }, # monitor all features
{ TYPE = "Priority", NAME = "low" },
{ TYPE = "Priority", NAME = "normal" },
{ TYPE = "Priority", NAME = "high" },
{ TYPE = "Priority", NAME = "top" },
{ NAME = "diskio" },
]
}
See Configuration File Examples for more complex resources.cfg options.
Start Accelerator as normal using ncmgr start. It will locate the LM ports using the licmon name in the registry.
Configuration File Format
The RDS config file consists of a single object in Attribute-Value Stream (AVS) format. AVS objects begin with an open curly brace '{' and end with a close curly brace '}'. Array attributes are expressed as a comma separated list inside square brackets []. In most cases array attributes with a single element may be expressed as the single element (TAGS = foo is equivalent to TAGS = [ foo ]). String type attributes are double quoted.
- RDS Global Attributes
- The LICENSE_MONTIORS array
- The RESOURCE_MAPS array
The objects within the RESOURCE_MAPS array may be one of the following object types. The first is identified by a NAME attribute, and is called a non-license resource definition. The second object type is identified by the presence of a FEATURE attribute and is called a license feature resource creation rule.
Flag values are generally indicated as on/true simply by their presence but may alternately be indicated on or explicitly off by setting the attribute to 0/1, off/on, false/true.
RDS Global Attributes (aka - Top/Daemon Level Attributes)
Attribute | Description | Default |
---|---|---|
DROPPED_RESMAP_DELETE_DELAY | When RDS is initializing, the amount of time in seconds that it will wait before deleting feature resource maps that are no longer represented in the license monitor data. This allows for delays in license monitor ↔ license server recovery. | 900 |
FLAGS | Array of flag overrides. | |
HEARTBEAT_THRESHOLD | How long to wait for a missing LM heartbeat before signaling a resync, in seconds. | 5 minutes |
INTERNAL_HEARTBEAT_THRESHOLD | (Internal for testing) overrides above with unlimited values. | |
LICENSE_MONITORS | LM project name, or an LM object. | |
LOG_LEVEL | The RDS logging level 0-7:
|
4 |
MATCHING_PERIOD | How often to perform matching in seconds. | 60 |
MAX_ORS_IN_RESOURCE_SUM | Max number of OR operators allowed in a sum resource using legacy OR operators. | 5 |
NOPIDMATCH | If asserted, then the PID associated with any license checkout, if available, will be ignored when Accelerator matches license checkouts with jobs. | |
RESOURCE_MAPS | Array of resource map and/or feature rule objects. | |
RM_RANK_DEFAULT | The default RANK of non-license resource maps. | 3 |
Non-License Resource Definition Object Attributes
Attributes for regular resource maps not related to the monitoring of LM features. Most of these attributes correspond to the same named fields in the vov resource maps meta data. Usually each non-licensed ResourceMap object in the resource.cfg file will create one resource map. See examples section below for more details.
Attribute | Description | Default |
---|---|---|
MAP | The MAP field of the resource map, string | none, "" |
NAME | The NAME of the resource map, string | None (required) |
NOLOG | flag, sets the NOLOG field in the resource map | off |
OWNER | The OWNER of the resource map. string | "(rds)" |
RANK | The RANK of the resource map, integer | 3 |
SPECIAL | Special exceptions to user specific resource maps, object | none |
TOTAL | The TOTAL/max available for this resource, integer or UNLIMITED | UNLIMITED |
TYPE | The TYPE of the resource map, string | none, "" |
License Feature Resource Rule Object Attributes
Attribute | Description | Default |
---|---|---|
EXCLUDE_FEATURES | Exceptions to FEATURES | None |
EXCLUDE_TAGS | Exceptions to TAGS | None |
FEATURES | Array of string patterns naming LM features to be matched by this rule. The array is optional for a single pattern. | None (required) |
LEGACY_SUM_RESMAPS | Flag that indicates the legacy OR operator should be used in the sum resource map's MAP field instead of the comma operator. | off |
MAP | A resource map MAP expression. It is applied to the leaf resource maps created by a FEATURE rule. | |
ORDER | The order in which to place the various tags in the sum resourcemap map field. The default is TAGORDER which indicates the same order as in the TAGS attribute. Alternately, REVERSE_TAGORDER, or a partial explicit array of tags may be specified. | TAGORDER |
SUM | Array of Custom Sum Resource Rule objects. See description below. | License:@FEATURE@ mapped to all matching tags in TAGORDER |
TAGS | Array of string patterns naming Tags to be matched by this rule. The array is optional for a single pattern | "*" |
TOTAL | Overrides the total available for the corresponding feature resourcemap rather than using the total available from LM. This value will also be used in the sum resourcemap total calculation unless that is also overridden. |
The following are flag attributes for feature rules. Their presence in the rule signifies that they are "On", their absence signifies "Off". Alternately they may be expressed as <name> = 1, or <name> = 0 for on/off respectively. Default: all are off.
Flags | Description |
---|---|
DONOTSHARE | Not used by RDS but it signifies something to LA ? |
EXCLUDE | Do not monitor tag/features matched by this rule (stops further rule evaluation for a matching tag/feature). |
LEGACY_SUM_RESMAPS | Use the legacy OR operator between members of the sum resource map in stead of the comma operator. |
NOALSOMATCH | Do not calculate additional matches for best matched jobs. |
NOMATCH | Do not perform matching. |
NOOOQ | Do not calculate Out-Of-Queue values, aka VovResourceMap "OTHERS" field. |
NOPIDMATCH | Direct Accelerator to ignore the PID information associated with a license checkout when matching license checkouts with jobs. |
NORECENT | Do not perform matching against recently finished jobs. |
NOSUM | Do not create a sum resource for this rule. |
NOVQASOOQ | Do not count vendor-queued licenses as OOQ. |
SUM1 | Create a sum resource even if the rule uniquely identifies a single feature. |
Custom Sum Resource Rule Object Attributes
By default, each feature rule will result in the creation of a single sum resourcemap for each matching feature containing all the matching tags. SUM-affecting attributes contained in the feature rule will be inherited by the "default" sum rule implicit in each feature rule. Grouping of tag/features into sum resources can generally be achieved by creating separate feature rules for each group. An explicit array of Sum resourcemap rule objects may be specified when multiple sums with overlapping tags is desired, or in order to override the sum's total or map fields.
Attribute | Description | Default |
---|---|---|
EXCLUDE_TAGS | Array of tag patterns to exclude from this sum | Inherited |
LEGACY_SUM_RESMAPS | Use the legacy OR operator between members of the sum resource map in stead of the comma operator | Inherited |
MAP | Override the map field | Auto maps each contained tag/feature in specified order |
NAME | The NAME of the sum resource to be created | "@FEATURE@" |
ORDER | The order for the tags in the map | Inherited |
TAGS | Array of tag patterns to include in this sum | Inherited |
TOTAL | Overrides the total number available | Auto sums the totals from tag/features contained |
TYPE | The TYPE of the sum resource to be created | Inherited |
Configuration File Examples
########################
# new default
########################
{
#LICENSE_MONITORS = { NAME = "licmon" },
RESOURCE_MAPS = [
#{ FEATURES = ALL }, # monitors all features/tags
#{ FEATURES = "feature1", TAGS = "tag1" }, # monitors tag1/feature1
# monitor all combinations of feature2, feature3, tag2, tag3
#{ FEATURES = [ "feature2", "feature3"], TAGS = [ "tag2", "tag3" ] },
{ TYPE = "Priority", NAME = "low" },
{ TYPE = "Priority", NAME = "normal" },
{ TYPE = "Priority", NAME = "high" },
{ TYPE = "Priority", NAME = "top" },
{ NAME = "diskio" }
],
}
#######################
# end new default
######################
###################################
# -- examples with documentation
###################################
{
#
# optional daemon/top level config params
#
RM_RANK_DFLT = 3, # default rank for non-lm resourcemaps created from this configuration, default is 3
MATCHING_PERIOD = 60, # period in seconds for which to accumulate lm changes before performing matching,
# evaluated per feature, default: 60
LOG_LEVEL = 4, # level of logging detail to use for RDS, default is 4 (Info), see rds_config.hh for levels
MAX_ORS_IN_RM_SUM = 5, # maximum number of OR operators allowed in a legacy sum resource
HEARTBEAT_THRESHOLD = 300, # max seconds after which no messages from an lm will trigger a reconnect/resync
# attempt, limit 2-15 minutes, default 300 (5 minutes)
LEGACY_SUM_RESMAPS = off, # whether or not to use the legacy OR operator by default in the sum resource maps instead
# of new default comma operator
# internal optional
INTERNAL_HEARTBEAT_THRESHOLD = 50, # overrides HEARTBEAT_THRESHOLD for testing without limits, default none
#
# section identifies license monitor instances, may be array or a single object )currently only a single
# license monitor is supported)
#
LICENSE_MONITORS = [
# preferred usage, use registry to locate the named licmon
{ NAME = "licmon" }, # lm info is looked up in registry
# alternate for when no access to shared registry
{
NAME = "licmon2",
HOST = "localhost",
EVENT_PORT = 12345,
}
],
#
# Resource map section:
#
# The resource map section contains rules that specify feature/tag combinations to be monitored and
# resource map definitions. Each entry may be a feature rule, a resourcemap definition, or a collection of
# related feature rules/resourcemap definitions that optionally share common parameter definitions.
# A feature rule contains the "FEATURES" parameter, when a new tag/feature combination is reported from an LM,
# it should be evaluated in order against all feature rules until a match is found. If a match is found (that
# is not an exclusion rule) a resource map for that specific tag/feature will be created, and that tag/feature
# will be monitored and included in the appropriate sum resources. Once a specific tag/feature is matched with
# a rule, no further rules are evaluated for that tag/feature pair.
# A feature rule containing the flag EXCLUDE, indicates that matching tag/feature combinations are not to be monitored
# and should be excluded from further rule matching.
# A collection contains a RESOURCE_MAPS parameter, and may contain default parameter definitions for the contained
# rules.
# A resource map definition contains neither FEATURES nor RESOURCE_MAPS parameters, has at least a NAME parameter.
RESOURCE_MAPS = [
# feature rule examples
{ FEATURES = "foo" }, # monitor feature foo across all lms and tags with all default values
{ FEATURES = [ "foo1", "foo2" ], TAGS = [ "bar1", "bar2 " ] }, # monitor all combinations
{ FEATURES = "foo?", TAGS = "bar?" }, # "
# collection examples:
{
TAGS = [ "CADENCE_AUS_DV01", "CADENCE_AUS_DV02", "SYNOPSYS_LDC01", "CADENCE_AUS_VIP01", "CADENCE_AUS_VIP02",
"CADENCE_AUS_VIP03", "SYNOPSYS_AUS_DV01", "MENTOR_SCV_GWAN06", "MENTOR_SCV_GWAN05", "MENTOR_WAN01",
"INTERRAD_WAN01", "APACHEDA_WAN01", "SYNOPSYS_US_GWAN01", "SYNOPSYS_US_GWAN03", "SYNOPSYS_US_GWAN02",
"CONCEPTENG_SOC01", "REALINTENT_SOC02", "CADENCE_SCV_GWAN02", "CADENCE_SCV_GWAN03", "CADENCE_SOC04",
"CADENCE_SCV_FV01", "SYNOPSYS_SOC01", "SMARTDV_SCV_GWAN01", "FRACTAL_WAN01", "SYNOPSYS_SCV_DV01" ],
# all entries in this RESOURCE_MAPS array, share the above LICMONS and TAGS defintions unless overridden:
RESOURCE_MAPS = [
{
FEATURES = "Formality*",
TAGS = [ "SYNOPSYS*"], # TAGS specified here completely replaces the upper level array of TAGS
SUM = [ # create 2 custom sum resourcemaps for each matching feature (note that the same tag may appear in multiple sums this way
{ TAGS = [ "SYNOPSYS_US_GWAN01", "SYNOPSYS_US_GWAN03" ], NAME = "@FEATURE@" }, # ex. License:SYNOPSYS1 will map to these tags
{ TAGS = [ "SYNOPSYS_DEV??", "SYNOPSYS_US_GWAN01" ], NAME = "@FEATUR@E_Dev" } # ex. License:SYNOPSYS1_Dev will map to these tags
]
},
{ FEATURES = "Incisive*", TAGS = "CADENCE_AUS_DV*" }, # override TAGS with glob
{ FEATURES = "Primtime", NOMATCH, NOOOQ, MATCHRECENT = 0 }, # override flags, MATCHRECENT is explicitly off
{ FEATURES = "Primtime-SI", NOMATCH, NOOOQ, MATCHRECENT = 0 },
# exclusion rule prevents matching feature/tags from triggering further rules (ex. CADENCE_SCV_GWAN02/Incisive)
# note that exclusion applies to all remaining rules in the config, not just in this collection
{ FEATURES = [ "Formality*", "Incisive*", "Conformal*" ], EXCLUDE },
# overbooking TBD V2 (internal)
{ FEATURES = "VCSRuntime_Net", OVERBOOK = { THRES = 0.5, FACTOR = 1.2, QUEUED = 1, HEADROOM = -20 } },
# Specify partial order
{ FEATURES = "Conformal*", TAGS = "CADENCE_*", ORDER = [ "*AUS*", "*SOC*", "*SCV*" ] }, # tags matched by the ORDER array will be mapped before
# other tags
{ FEATURES = "*" } # all features not already matched above (inherited TAGS def still applies)
]
},
{
TAGS = [ "SYNOPSYS_WANLIC", "SYNOPSYS_EVALLIC" ],
TYPE = "Mytype", # default "License", can override - ( was "" in customer example, not allowing "" )
RESOURCE_MAPS = [
{ FEATURES = "1TA-OPT-SPY-GuiPkg", NAME = "atrenta_optspygui" }, # renames sum because multiple tags
{ FEATURES = "Advanced_CDC", NAME = "atrenta_advancedcdc" },
{ FEATURES = "BasePolicySO", NAME = "atrenta_basepolicyso" },
{ FEATURES = "adv_checker", NAME = "atrenta_advchecker" },
{ FEATURES = "checker", NAME = "atrenta_checker" },
# related resourcemap definitions
{ NAME = "atrenta_spyglass",
MAP = "atrenta_advancedcdc atrenta_basepolicyso atrenta_advchecker atrenta_checker" },
{ NAME = "atrenta_advancedcdc", MAP = "Mytype:atrenta_advancedcdc" }, # add typeless maps
{ NAME = "atrenta_basepolicyso", MAP = "Mytype:atrenta_basepolicyso" },
{ NAME = "atrenta_advchecker", MAP = "Mytype:atrenta_advchecker" },
{ NAME = "atrenta_checker", MAP = "Mytype:atrenta_checker" },
]
},
{
EXCLUDE_TAGS = "*BETA*", # all tags except those that match "*BETA*"
RESOURCE_MAPS = [
# sum Formality1 as normal/default
{ FEATURES = "Formality1" },
# sum other Formality* features with DEV tags as @FEATURE@_Dev and disable logging for these features
{ FEATURES = "Formality*", TAGS = [ "SYNOPSYS_DEV??" ], NORECENT, NAME = "@FEATURE@_Dev" },
# sum other Formality* features with PROD tags as @FEATURE@_Prod and disable ooq for these features
{ FEATURES = "Formality*", TAGS = [ "SYNOPSYS_PROD??" ], NOOOQ, NAME = "@FEATURE@_Prod" },
# monitor remaining Formality* tags and sum under _misc, but exclude tag EVAL from the sum
{ FEATURES = "Formality*", NAME = "@FEATURE@_misc", SUM = { EXCLUDE_TAGS = "EVAL" } },
],
},
# all features that start with "Bar", except "BarTest", (all tags)
{ FEATURES = "Bar*", EXCLUDE_FEATURES = "BarTest" },
# more customer examples:
# customer example
{
TAGS = "ARTWORK",
RESOURCE_MAPS = [
{ FEATURES = "ACS3520", NAME = "gdsplot" }, # renames specific to License:gdsplot
{ FEATURES = "ACS5003", NAME = "qckvugds" },
{ FEATURES = "ACS58IO", NAME = "qckvu3gdsII_full" },
# create resource map that combines features
{ TYPE = "License", NAME = "qckvu", MAP = "License:qckvu3gdsII_full | License:qckvugds" },
]
},
# customer example
{
TAGS = [ "SYNOPSYS_WANLIC", "SYNOPSYS_EVALLIC" ],
TYPE = "Mytype", # default "License", can override - ( was "" in customer example, not allowing "" )
RESOURCE_MAPS = [
{ FEATURES = "1TA-OPT-SPY-GuiPkg", NAME = "atrenta_optspygui" }, # renames sum because multiple tags
{ FEATURES = "Advanced_CDC", NAME = "atrenta_advancedcdc" },
{ FEATURES = "BasePolicySO", NAME = "atrenta_basepolicyso" },
{ FEATURES = "adv_checker", NAME = "atrenta_advchecker" },
{ FEATURES = "checker", NAME = "atrenta_checker" },
{ NAME = "atrenta_spyglass",
MAP = "atrenta_advancedcdc atrenta_basepolicyso atrenta_advchecker atrenta_checker" },
{ NAME = "atrenta_advancedcdc", MAP = "Mytype:atrenta_advancedcdc" }, # add typeless maps
{ NAME = "atrenta_basepolicyso", MAP = "Mytype:atrenta_basepolicyso" },
{ NAME = "atrenta_advchecker", MAP = "Mytype:atrenta_advchecker" },
{ NAME = "atrenta_checker", MAP = "Mytype:atrenta_checker" },
]
},
# order overrides
{
TAGS = [ A, B, C ],
RESOURCE_MAPS = [
{ FEATURES = "orderExample1" }, # default TAGORDER
{ FEATURES = "orderExample2", ORDER = REVERSE_TAGORDER },
{ FEATURES = "orderExample3", ORDER = SHUFFLE },
{ FEATURES = "orderExample4", ORDER = [ B, C ] } # explicit partial order
]
},
# sum overrides
{
TAGS = [ D, E, F ],
RESOURCE_MAPS = [
{ FEATURES = "sumExample4" }, # create default sum if multiple tags exist
{ FEATURES = "sumExample1", SUM = { TAGS = [ D, E ] } }, # exclude F from sum
{ FEATURES = "sumExample2", NOSUM }, # do not create sum
{ FEATURES = "sumExample3", SUM1 }, # create sum even if only one of the tags exists
{ FEATURES = "sumExample5", SUM = { NAME = "sum5", RANK = 4 } }, # create default sum, override name and rank
{ FEATURES = "sumExample6", LEGACY_SUM_RESMAPS }, # create default sum except use legacy ORs
{ FEATURES = "sumExample7", LEGACY_SUM_RESMAPS = 0 }, # create default sum except don't use legacy ORs (useful when when LEGACY_SUM_RESMAPS is the default)
]
},
# feature with a map
{ FEATURES = "mappedFeature", SUM1, NOOOQ, MAP = "linux64" },
# example resource map definitions not related to features
{
TYPE = "Priority",
RESOURCE_MAPS = [
{ NAME = "low" }, # default UNLIMITED
{ NAME = "normal" },
{ NAME = "high" },
{ NAME = "top" },
]
},
{ NAME = "diskio" }, # default TYPE = ""
{ TYPE = "Tool", NAME = "footool" }, # override TYPE
{ NAME = linux, MAP = "centos | ubuntu" },
# Limit resource examples:
{
TYPE = "Limit",
RESOURCE_MAPS = [
# create Limit:random_@USER@ with total = 305 on demand for each user
{
NAME = "random_@USER@",
TOTAL = 305,
SPECIAL = [ # override totals for these specific users:
{ NAME = "random_a_mur", TOTAL = 5000 },
{ NAME = "random_segdv_total_limit", TOTAL = 20500 },
{ NAME = "random_sbenarye", TOTAL = 600 },
{ NAME = "random_nmalki", TOTAL = 600 },
{ NAME = "random_tgreenshtein", TOTAL = 600 }
]
},
# create map to this limit, UNLIMITED by default
{ NAME = "random_segdv", MAP = "Limit:regression_segdv_total_limit" },
]
}
], # end outer RESOURCE_MAPS
# FLAGS section overrides flags for specific resmaps
FLAGS = [
{ TYPENAME = "License:bar_foo", NORECENT },
{ TYPENAME = "Mytype:atrenta_advancedcdc", NOOOQ, DONOTSHARE }
]
}
# end of resource.cfg