ViPR 2.2 - Set up Metrics-Based Port Selection using the ViPR REST API
Table of Contents
Overview
Learn how to create maximum limits for port allocation. Allocating new ports based on performance metrics, computed metrics, and user-defined maximum limits is supported on VMAX, VNX for Block, and Hitachi Data Systems (HDS).
- Port percent busy.
- CPU percent busy.
- Number of initiators using a storage port.
- Number of volumes using a storage port.
- Ports that are overloaded with too many volumes or too high of an I/O load.
- Ports that reside on CPUs where the CPU percent busy is too high or the CPU is servicing too many volumes.
- Allocating more storage on arrays that are overloaded.
For further information on the metrics and how they are used to allocate ports, see Understanding Metrics-Based Port Selection in ViPR.
Back to TopMetering prerequisites
There are two configuration properties that you must ensure are set to enable the collection of metrics from VMAX, VNX for Block, and HDS. These properties are controller_enable_metering and controller_metering_interval.
Before you begin
- Authenticate with the ViPR REST API as a System Administrator.
- Configuration properties to verify:
- controller_enable_metering - should be set to true to collect metrics from the arrays.
- controller_metering_interval - sets how often ViPR will collect data from the arrays. The metering interval can be set from 1800 seconds (30 minutes) up to 4 hours. The lower the number of seconds, the more accurate will be the results. However, the higher the metering interval is, the less overhead there is on ViPR and the array.
- EMC ViPR REST API Reference provides a description and complete list of parameters for the REST API methods used in this article.
Procedure
- Get the list of configuration properties and their values by sending a
GET /config/properties request.
Request
GET https://<ViPR_VIP>:4443/config/properties Content-Type: application/xml X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
ResponseFor readability, only a small number of the configuration properties are shown in the response.
HTTP 200 OK Content-Type: application/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <property_info> <properties> <entry> <key>backup_external_location_password</key> <value/> </entry> <entry> <key>backup_external_location_url</key> <value/> </entry> <entry> <key>backup_external_location_username</key> <value/> </entry> <entry> <key>backup_scheduler_copies_to_keep</key> <value>5</value> </entry> <entry> <key>controller_enable_autoscan</key> <value>true</value> </entry> <entry> <key>controller_enable_metering</key> <value>true</value> </entry> <entry> <key>controller_enable_monitoring</key> <value>true</value> </entry> <entry> <key>controller_metering_interval</key> <value>3600</value> </entry> <entry> <key>controller_netapp_firmware_version</key> <value>8.1.1</value> </entry> </properties> </property_info>
- Verify that controller_enable_metering is set equal to true, and that controller_metering_interval is set to the required value.
Prerequisite configuration settings for VNX for Block
You must enable performance data logging in EMC Unisphere so that VNX for Block sends the required metrics to ViPR before you can set up metrics-based port selection for VNX for Block .
Procedure
- Log into the EMC Unisphere.
- Select Monitoring and Alerts section. . Statistics for Block can be found in the
- Click
Performance Data Logging.
The Data Logging dialog is displayed.
- If data logging is not already started:
Do not change the default times for Real Time Interval and Archive Interval.
- Click Start to start data logging.
- Click Apply.
- Click OK.
Prerequisite configuration settings for HDS
Before ViPR can collect statistical information for HDS storage ports, you must create a new user in the Storage navigator and enable performance logging for the HDS storage arrays.
Enable performance data logging of HDS storage arrays in Storage Navigator
Before you can set up the metrics-based port selection for HDS, you must enable performance data logging for the HDS storage arrays in Storage navigator so that ViPR can collect statistical information about the storage ports.
Procedure
- Log into the Storage navigator.
- Select Performance Monitor.
- Click Edit Monitor Switch.
- Enable Monitor Switch.
- Set the Sample Interval.
Create a new user using the Storage navigator on HDS
To collect statistics using the embedded SMI-S provider, you must create a new user using the Storage Navigator on the Hitachi storage array.
Procedure
- Log into the Storage Navigator.
- Select Administrator.
- Click User Groups.
- Select Storage Administrator (View Only) User Group.
- Click Create User.
-
The username and password must be the same as the HiCommand Device Managercredentials which ViPR uses for discovering the storage provider.
Type a User Name. - Type a Password.
- Type the Account status.
- Type the Authentication details.
Enable SMI-S Certificates on Hitachi Arrays
You must enable the certificate on the array to access SMI-S in secure mode..
Please refer to the section, Using the SMI-S function, in the Hitachi Command Suite Administrator guide to enable default or upload new certificates on the array to access SMI-S in secure mode.
Back to TopChange the default port allocation parameters using the REST API
System administrators can change the default values of the port allocation parameters by adding a new parameter setting. When you add a new parameter setting, ViPR will use your setting value instead of the default value.
Before you begin
- Authenticate with the ViPR REST API as a System Administrator.
- Verify how often ViPR will collect data from the array.
- Verify that metrics collection from the arrays is enabled.
- Prerequisite configuration settings for VNX.
- Prerequisite configuration settings for HDS.
- The following configuration types can be set for port allocation:
- PortAllocationInitiatorCeiling - Maximum number of initiators that can use the port before new allocations will not be allowed.
- PortAllocationVolumeCeiling - Maximum number of volumes that can use the port before new allocations will not be allowed.
- PortAllocationPortUtilizationCeiling - Maximum average port percent busy value (from 0 to 100%) before new allocations are not allowed.
- PortAllocationCpuUtilizationCeiling - Maximum average CPU percent busy value (from 0 to 100%) before new allocations are not allowed.
- PortAllocationDaysToAverageUtilization - The sample averaging time in days (1 -30 days) .
- PortAllocationEmaFactor - The EMA weight for the current sample. The EMA weight is greater than zero and less than or equal to 1.0. A value of 1.0 uses only the current averaging period.
- PortAllocationMetricsEnabled
CPU percent busy is not calculated for HDS
- true = use collected metrics and calculate Port percent busy and CPU percent busy.
- false = only use the number of initiators and the number of volumes to allocate ports; ignore the collected metrics and do not calculate Port percent busy and CPU percent busy.
The EMC ViPR REST API Reference provides a description and complete list of parameters for the REST API methods used in this article.
In this example, the maximum number of volumes that can use the port before new allocations will not be allowed is changed to 2000000000 for VMAX.
Procedure
- Retrieve the variables that define the configuration type by sending
GET /config/controller/types/<configuration_type>.
Each configuration type includes one or more scopes that can be defined. The response includes the type of scope and the valid values for the scope. In addition, each variable that is returned includes the name of the variable and sample values.Request
GET https://<ViPR_VIP>:4443/config/controller/types/PortAllocationVolumeCeiling Content-Type: application/xml X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
ResponseHTTP 200 OK <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <config_type> <name>PortAllocationVolumeCeiling</name> <rules> <rule>MinConstraintOne</rule> </rules> <scopes> <scope> <type>global</type> <value>default</value> </scope> <scope> <type>systemType</type> <value>vnxblock</value> <value>vmax</value> <value>hds</value> </scope> </scopes> <type>Integer</type> </config_type>
- Add the custom
naming convention value for
PortAllocationVolumeCeiling using
POST /config/controller. To change the value for
VMAX, the type of scope should be
systemType and the value of the scope should be
vmax. The new configuration for
PortAllocationVolumeCeiling is returned.
Request
POST https://<ViPR_VIP>:4443/config/controller/ Content-Type: application/xml X-SDS-AUTH-TOKEN: <AUTH_TOKEN> <config_create> <config_type>PortAllocationVolumeCeiling</config_type> <value>2000000000</value> <scope> <type>systemType</type> <value>vmax</value> </scope> </config_create>
ResponseHTTP 200 OK <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <config> <id>urn:storageos:CustomConfig:45649fa3-274c-4dbd-b50c-9e3509ab1b6f:vdc1</id> <link rel="self" href="/config/controller/urn:storageos:CustomConfig:45649fa3-274c-4dbd-b50c-9e3509ab1b6f:vdc1"/> <name>systemType.vmax.PortAllocationVolumeCeiling</name> <tags/> <config_type> <name>PortAllocationVolumeCeiling</name> <link rel="self" href="/config/controller/types/PortAllocationVolumeCeiling"/> </config_type> <registered>true</registered> <scope> <type>systemType</type> <value>vmax</value> </scope> <system_default>false</system_default> <value>2000000000</value> </config>
The response also includes the URN for your new configuration. If you want to modify the value of your configuration, you can use the URN in the request PUT /config/controller/{ID} to change the value. For example:PUT https://<ViPR_VIP>:4443/config/controller/urn:storageos:CustomConfig:45649fa3-274c-4dbd-b50c-9e3509ab1b6f:vdc1 Content-Type: application/xml X-SDS-AUTH-TOKEN: <AUTH_TOKEN> <config_update> <value>1900000000</value> </config_update> HTTP 200 OK <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <config> <id>urn:storageos:CustomConfig:45649fa3-274c-4dbd-b50c-9e3509ab1b6f:vdc1</id> <link rel="self" href="/config/controller/urn:storageos:CustomConfig:45649fa3-274c-4dbd-b50c-9e3509ab1b6f:vdc1"/> <name>systemType.vmax.PortAllocationVolumeCeiling</name> <tags/> <config_type> <name>PortAllocationVolumeCeiling</name> <link rel="self" href="/config/controller/types/PortAllocationVolumeCeiling"/> </config_type> <registered>true</registered> <scope> <type>systemType</type> <value>vmax</value> </scope> <system_default>false</system_default> <value>1900000000</value> </config>
Additional REST API calls to manage your custom port allocation settings
The table shows some additional APIs that are used to manage your custom port allocation settings.