Changing the collection level for the Storage DRS and the SIOC data counters in the VMware vSphere 5.0 Update 1 and later using the Level Mapping Utility
search cancel

Changing the collection level for the Storage DRS and the SIOC data counters in the VMware vSphere 5.0 Update 1 and later using the Level Mapping Utility

book

Article ID: 343988

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

In the VMware vCenter Server and the VMware vSphere Client, the performance data counters abstract the types of statistical information that performance charts display. You can control the number of enabled data counters by selecting a statistics collection level.

You can assign a collection level of 1 to 4 to each collection interval enabled on your vCenter Server, with level 1 being the default and level 4 containing the most data counters. Together, the collection interval and the collection level determine how much statistical data is collected and stored in your vCenter Server database. For more information, see vSphere Monitoring and Performance.


Storage DRS and SIOC Data Counters in vSphere 5.0

In the vSphere 5.0, by default the Storage DRS and Storage I/O Control (SIOC) counters are enabled at collection level 1. If your vSphere 5.0 environment is configured for Storage DRS, a large number of data counters are enabled at collection level 1. This might result in a significant increase in the vCenter Server database bandwidth and reduced performance. To improve performance, VMware strongly recommends reducing the number of data counters collected at level 1 by moving the Storage DRS and the SIOC counters to level 3.

Moving the Storage DRS and the SOIC counters to a higher collection level effectively disables non-realtime datastore performance charts. If you are not utilizing these performance charts, VMware highly recommends moving the Storage DRS and the SIOC counters to level 3 to avoid any performance issues associated with a large number of counters enabled at collection level 1.

Storage DRS and SIOC Data Counters in vSphere 5.0 Update 1 and later

In vSphere 5.0 Update 1 and later, by default the Storage DRS and SIOC counters are not as active at the statistics collection level 3. This effectively disables non-realtime datastore performance charts. To re-enable these performance charts, you can choose to move those counters back to collection level 1.

Note: Moving the Storage DRS and the SOIC counters to a lower collection level negatively impacts performance because more statistics have persisted, requiring more I/O and database operations. If you move a large number of data counters from collection level 3 to collection level 1, you might observe these symptoms:
  • Loss of statistical data
    A large number of enabled data counters might overwhelm statistics processing, resulting in dropped counters.

  • Slow roll-ups of statistical data
    The increased number of enabled data counters can cause the statistics roll-up procedures to run slowly. As a result, statistical information might not be available as expected.

  • Slow purging of statistical data
    The increased number of enabled data counters can slow down purge operations. As a result, statistical information might not be purged as expected.
You will notice that the Collection Level is still set to Level 1 instead of the expected Level 3 for the Storage DRS and the SIOC data counters.

To view the current status of the Collection Level values:
  1. Connect to your vCenter Server using the vSphere Client.
  2. Click Home > Inventory > Hosts and Clusters.
  3. Click a virtual machine, then click the Performance tab.
  4. Click Advanced.
  5. Click Chart Options, then:

    • Click Past day under Virtual disk in the left pane.
    • In the Counters list view, check these counters:
      • Average read requests per second (virtualDisk.numberReadAveraged)
      • Average write requests per second (virtualDisk.numberWriteAveraged)
      • Read latency (virtualDisk.totalReadLatency)
      • Write latency (virtualDisk.totalWriteLatency)
    • Check the Collection Level column.
This is by design. The Collection Level field was not updated by the change introduced in the vCenter Server 5.0 Update 1 and later.

The performance counters used by vSphere have two types of collection level, Per Device Level and Aggregated Level. The Per Device Level is defined as the collection level for stats of individual devices. The Aggregated level is defined as the collection level for stats from all devices, such as the sum or average over all devices.

The Collection Level column discussed above always shows the Aggregated Level stats. This is by design in the VI/vSphere Client since the vCenter Server 1.x.

This might mean that you see different results from the actual collection level, if the performance counter you are monitoring gathers statistics based on a Per Device Level.

This is a list of performance counters affected by the change introduced in the vCenter Server 5.0 Update 1 and later. Their Per Device Level is 3, but the Aggregated Level is 1. The Collection Level column in the performance charts viewed above reports that the Collection Level is 1; however, the stats data that is collected is at Per Device Level 3.
disk.numberReadAveraged
disk.numberWriteAveraged
virtualDisk.numberReadAveraged
virtualDisk.numberWriteAveraged
virtualDisk.totalReadLatency
virtualDisk.totalWriteLatency
datastore.numberReadAveraged
datastore.numberWriteAveraged
datastore.totalReadLatency
datastore.totalWriteLatency
datastore.datastoreIops
datastore.sizeNormalizedDatastoreLatency
datastore.datastoreReadIops
datastore.datastoreReadOIO
datastore.datastoreWriteIops
datastore.datastoreWriteOIO
datastore.siocActiveTimePercentage
datastore.datastoreVMObservedLatency
datastore.datastoreMaxQueueDepth
disk.maxQueueDepth
disk.deviceLatency
For information on the other performance counters, see the PerformanceManager Managed Object description in the VMware vSphere API Reference.

Review the details of the LEVELS, PER DEVICE LEVEL, and INSTANCE/AGGREGATE columns to identify the statistic level at which the performance data is collected:
  • If INSTANCE/AGGREGATE is instance, the data is collected at PER DEVICE LEVEL.
  • If INSTANCE/AGGREGATE is aggregate, the data is collected at AGGREGATED LEVELS.


Environment

VMware vCenter Server 5.0.x
VMware vCenter Server 5.5.x
VMware vCenter Server 5.1.x
VMware vSphere ESXi 5.0
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.5

Resolution

To modify the configured collection levels of the Storage DRS and the SIOC data counters use the process detailed below.

You can use the attached vSphere PowerCLI module to adjust the collection level of the Storage DRS and the SIOC data counters as required.

Ensure that you have VMware vSphere Power CLI installed. For more information, see Installing VMware vSphere PowerCLI.
  1. On a Windows system with the vSphere PowerCLI, download the LevelMappingUtility.zip archive which is attached to this article and extract the files to a local directory. The archive contains the files VMware.VimAutomation.PowerCliExtensions.CounterLevelMapping.psm1 and sdrs-sioc-reenable.csv.

  2. Open a vSphere PowerCLI window and run this command to import the module:

    Import-Module path_to_file\VMware.VimAutomation.PowerCliExtensions.CounterLevelMapping.psm1

  3. Connect to one or more vCenter Server 5.0 Update 1 systems by running the command:

    Connect-VIServer vCenter_Server_IP_address, vCenter_Server_IP_address

    Note: By default, you can only connect to a single vCenter Server instance by using vSphere PowerCLI. To enable connections to multiple vCenter Server instances, you must first run this command:

    Set-PowerCLIConfiguration -DefaultVIServerMode multiple

  4. To change the collection level for the Storage DRS and the SIOC counters, run one of these commands:

    • Move the Storage DRS and the SIOC per device collection level to level 1:

      Import-csv -path path_to_file\sdrs-sioc-reenable.csv | Set-PxCounterLevelMapping -Server IP_address_of_vCenter_Server_system, IP_address_of_vCenter_Server_system

      After running this command, you have moved the Storage DRS and the SIOC counters to level 1. Run the command below only if you want to reset the changes that you have made and move the counters back to the default level.

      Note: A large number of counters enabled at collection level 1 might negatively impact performance.

    • Reset the Storage DRS and the SIOC per device collection level to the default level 3:

      Import-csv -path path_to_file\sdrs-sioc-reenable.csv | Set-PxCounterLevelMapping -Server IP_address_of_vCenter_Server_system, IP_address_of_vCenter_Server_system -reset

    Notes:
    • You can run the commands against single or multiple vCenter Server systems.
    • If you are using an incorrect version of the vSphere PowerCLI, such as version 4.1, instead of version 5.0 Update 1, you may see the error:

      Method invocation failed because [VMware.Vim.PerformanceManager] doesn't contain a method named 'UpdateCounterLevelMapping'
To check your setting via PowerCLI, run this command:

Get-PxCounterLevelMapping -Server IP_address_of_vCenter_Server_system | findstr String_or_Counter

Where String_or_Counter can be any string/counter listed for the counters above.

For more information, see VMware vSphere PowerCLI User's Guide.

Additional Information

For translated versions of this article, see:

Attachments

LevelMappingUtility.zip get_app