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).

Several performance-based metrics are collected from VMAX, VNX for Block, and HDS and are used to determine:
  • Port percent busy.
  • CPU percent busy.
in addition, two additional metrics are computed:
  • Number of initiators using a storage port.
  • Number of volumes using a storage port.
These metrics are then used to allocate new ports to avoid:
  • 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 Top

Metering 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

Procedure

  1. 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>
    Response
    Note Image
    For 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>
    
  2. Verify that controller_enable_metering is set equal to true, and that controller_metering_interval is set to the required value.
Back to Top

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

  1. Log into the EMC Unisphere.
  2. Select System > Statistics for Block. Statistics for Block can be found in the Monitoring and Alerts section.
  3. Click Performance Data Logging.
    The Data Logging dialog is displayed.
  4. If data logging is not already started:
    Note Image
    Do not change the default times for Real Time Interval and Archive Interval.

    1. Click Start to start data logging.
    2. Click Apply.
  5. Click OK.
Back to Top

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.

Back to Top

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

  1. Log into the Storage navigator.
  2. Select Performance Monitor.
  3. Click Edit Monitor Switch.
  4. Enable Monitor Switch.
  5. Set the Sample Interval.
Back to Top

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

  1. Log into the Storage Navigator.
  2. Select Administrator.
  3. Click User Groups.
  4. Select Storage Administrator (View Only) User Group.
  5. Click Create User.
  6. Note Image
    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.
  7. Type a Password.
  8. Type the Account status.
  9. Type the Authentication details.
Back to Top

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 Top

Change 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

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

  1. 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>
    Response
    HTTP 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>
  2. 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>
    
    Response
    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>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>
    
Back to Top

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.

Back to Top