cluster.config under each module’s conf directory. You can create a cluster.config file from scratch, following a convention explained in the upcoming sections of this page, or use the cluster.template file as a base template.
The cluster configuration file template will be deployed with each module as part of the RPM installation and can be found under the module’s conf directory at:
cluster.config file is the same for all modules on all servers except for a subset of module-specific parameters that will be expalined later on.
The recommended way to handle the config creation is to:
- Create a common configuration file WITHOUT including the module-specific parameters and save it as
cluster.config. - Copy the common
cluster.configto all the cluster’s servers and place a copy of it in each module’sconfdirectory (using tools likescporrsync). - Edit the
cluster.configunder each module’s conf folder to include the module-specific parameters for that module at the end of the file.
cluster.config file for all Regatta modules in the following path:
Configuration Convention
Thecluster.config file must be written following these convention rules:
- The config file must have a single “system” section.
- The config file must have at least one node section.
- The config file must have at least one RDB module, as well as one of each GDD, Sequencer, and DCM.
- The config file must have at least one block storage device for each RDB module.
- Each module must be linked to a node via the
parent_node_idparameter. - Each block device must be linked to its controlling RDB module via the
module_idparameter. - The
capacityparameter of the device is specified in kilobytes (KB). - Every node, module, and device must have a unique ID parameter, starting at 1.
Configuration Sections Breakdown
Main Configuration (Top Part)
System Section
Starting at the very top of the configuration file is the description of the entire system.system_cluster_id- This is a unique 32-bit identifier used to differentiate Regatta clusters.system_num_cpus- This defines the number of CPU threads that will be utilized by the specific module.system_root_dir- Path in which you installed the Regatta software modules.system_trace_prefix- Prefix for internal trace files.system_genesis_mode- Genesis means fresh start. NonGenesis for starting after shutdown.system_cluster_join_timeout_sec- Number of seconds for modules to wait for connection to the cluster. 0 means unlimited.
Node Section
Following the system section are the “Node” parameters, followed by the “Module” parameters.- Node ID
- Node Name
- Node IP
- Node Port
A valid
cluster.config file must include a node with ID set as 1. Every parameter in a node section must follow the naming rule of node_<node id>_<parameter>. In the case of the first node in the cluster, every parameter name will begin with node_1_.Modules Definition
Following the node section are the modules’ definitions.module_X_id- This is a unique number used to identify the module.module_X_parent_node_id- This is a number matching the parent node ID. This parameter links this specific module to its parent node in the config.module_X_name- This is the module name, which can be any string.module_X_role- This parameter defines the behavior of the module. All modules share the same binary and require this parameter to function as the intended role of either RDB, GDD, DCM, or Sequencer.module_X_ip- This is the IP address with which the module will listen for TCP communication.module_X_port- This is the port on which the module will listen for TCP communication.
Similarly to node parameters, module parameters must also follow the naming rule of
module_<module id>_<parameter>. The module ID numbering should start at 1.Devices Definition
Each RDB module defined in the cluster configuration file requires at least one block storage device (simply referred to as “device” in this document). Just as a module is linked to a parent node, a device is linked to a parent RDB module. Let’s look at an example for how to set a single device and link it to an RDB module:dev_X_module_id- This links the device to an RDB module. The value here should match the ID set on the RDB module’s_idparameter.dev_X_name- The name of the device. Should be defined following a pattern ofm<parent rdb module id>d<number of the device>.dev_X_type- This represents the type of the device as one of the options:SCRATCH,fast_devices.dev_X_local_number- This number is used to identify the device by its parent RDB module, starting at 1 and incrementing. This number should be unique only within the scope of the node.dev_X_atomic_page_size- Defined in bytes. This sets the page size that the RDB module will use on this device.dev_X_block_size- Defined in bytes. This sets the block size that the RDB module will use on this device.dev_X_capacity- Defined in bytes. This value represents the storage capacity of the device.dev_X_path- The absolute path to the device on the node. Should be under/dev/.
As with node and module parameters, the naming rule for the device’s parameters should start with
dev_<id of the device>. The ID of a device should be unique across the cluster configuration file.The device’s
local_number parameter should represent a numbering of the device as part of the list of devices available to a certain RDB module. It should always start at 1 and increment with each added device belonging to the same RDB module.m + <parent rdb module id> (which together represent the RDB module this device belongs to) + d + <device number> as defined in the local_number parameter. The end result names look like m10d1, m10d2, and so on…
Looking at the example cluster configuration file at the end of this page, notice that the two additional nodes in the cluster after node 1 are defined with the RDB module only with a single device.
Recommended Approach
Many parameters can stay as in the example. The node-specific parameters should be updated accordingly. These would be:- IPs of the node and its belonging modules
- Dedicated ports for the modules
- Device parameters
- Page size
- Block size
- Capacity
- Path For the modules’ ports, you may select any number you wish that is not in use. Regatta uses the following recommended defaults:
- RDB: 8850
- Sequencer: 8841
- GDD: 8842
- DCM: 8843
Unique Module Configuration (Bottom Part)
The second part of thecluster.config file is the module-specific section. This section is usually defined at the bottom of the config file.
The section is comprised of 2 parameters: core_total_ram_budget_for_module_mb and core_pdbg_port
core_total_ram_budget_for_module_mb
This is the RAM capacity which is dedicated to the module in MB. In order to calculate the best value to define in this parameter, we suggest the following recommended guidelines:- Get the total RAM available on the server host
- Subtract 1 GB for the OS usage from the total RAM
- For the GDD, DCM, Sequencer dedicate at least 500MB each
- For the RDB dedicate whatever is left on the server.