The multidimensional resource plan supports four predefined resource metrics that can be
scheduled. Perform this task if you want to configure custom resource metrics for your
multidimensional resource plan. Configuring dynamic (not static)
resources for your multidimensional resource plan is supported.
About this task
The predefined resource metrics are as follows:
- ncpus: Number of CPU cores that is used for multidimensional
scheduling.
- maxmem: Maximum amount of RAM (in MB) that is used for multidimensional
scheduling.
- maxswp: Maximum amount of virtual memory (swap space) (in MB) that is
used for multidimensional scheduling.
- maxtmp: Maximum amount of space in /tmp.
If you want to define your own dynamic resource metric,
complete the steps in this task.
Procedure
-
Open the ego.shared file at
$EGO_CONFDIR.
- In the Resource section of the ego.shared file, define the
dynamic resource metric that you want to add to the multidimensional
resource plan by adding [MDS] to the beginning of the comment field for the
resource metric.
For
example:
diskwrite Numeric 10 Y ([MDS] Disk write load metric in KB/s)
Note: The
resource must be defined as numeric.
- Save the changes to the ego.shared file.
- By default, the resources are host-based (that is, local to each host), until you
configure a resource-to-host-mapping in the
ego.cluster.cluster_name cluster configuration file. In the
ResourceMap section of the ego.cluster.cluster_name file,
map the resource metric to hosts in your cluster.
For
example:
diskwrite [all]
- Save the changes to the ego.cluster.cluster_name
file.
- Create one or more elim executables (called
elim.resource_metric.sh), and install them in the
%EGO_ESRVDIR%
$EGO_ESRVDIR directory.
For
example:
[root@myhost etc]# cat elim.diskwrite.sh
#!/bin/sh
while :
do
echo "1 diskwrite 123"
sleep 10 # 10 seconds interval
done
- Restart the cluster for the changes to take effect.
Tip: For expanded details on steps to creating an elim executable for your custom
resource metric, and mapping external resources, see
Enabling external load indices.