XenServer

Monitor and manage your deployment

XenServer provides detailed monitoring of performance metrics. These metrics include CPU, memory, disk, network, C-state/P-state information, and storage. Where appropriate, these metrics are available on a per host and a per VM basis. These metrics are available directly, or can be accessed and viewed graphically in XenCenter or other third-party applications.

XenServer also provides system and performance alerts. Alerts are notifications that occur in response to selected system events. These notifications also occur when one of the following values goes over a specified threshold on a managed host, VM, or storage repository: CPU usage, network usage, memory usage, control domain memory usage, storage throughput, or VM disk usage. You can configure the alerts by using the xe CLI or by using XenCenter. To create notifications based on any of the available Host or VM performance metrics see Performance alerts.

Monitor XenServer performance

Customers can monitor the performance of their XenServer hosts and Virtual Machines (VMs) using the metrics exposed through Round Robin Databases (RRDs). These metrics can be queried over HTTP or through the RRD2CSV tool. In addition, XenCenter uses this data to produce system performance graphs. For more information, see Analyze and visualize metrics.

Analyze and visualize metrics

The Performance tab in XenCenter provides real time monitoring of performance statistics across resource pools in addition to graphical trending of virtual and physical machine performance. Graphs showing CPU, memory, network, and disk I/O are included on the Performance tab by default. You can add more metrics, change the appearance of the existing graphs or create extra ones. For more information, see Configuring metrics in the following section.

  • You can view up to 12 months of performance data and zoom in to take a closer look at activity spikes.

  • XenCenter can generate performance alerts when CPU, memory, network I/O, storage I/O, or disk I/O usage exceed a specified threshold on a host, VM, or SR. For more information, see Alerts in the following section.

Note:

Install the XenServer VM Tools to see full VM performance data.

Configure performance graphs

To add a graph:

  1. On the Performance tab, click Actions and then New Graph. The New Graph dialog box is displayed.

  2. In the Name field, enter a name for the graph.

  3. From the list of Datasources, select the check boxes for the datasources you want to include in the graph.

  4. Click Save.

To edit an existing graph:

  1. Navigate to the Performance tab, and select the graph that you would like to modify.

  2. Right-click on the graph and select Actions, or click the Actions button. Then select Edit Graph.

  3. On the graph details window, make the necessary changes, and click OK.

Configure the graph type

Data on the performance graphs can be displayed as lines or as areas. To change the graph type:

  1. On the Tools menu, click Options and select Graphs.

  2. To view performance data as a line graph, click the Line graph option.

  3. To view performance data as an area graph, click the Area graph option.

  4. Click OK to save your changes.

Comprehensive details for configuring and viewing XenCenter performance graphs can be found in the XenCenter documentation in the section Monitoring System Performance.

Configure metrics

Note:

C-states and P-states are power management features of some processors. The range of states available depends on the physical capabilities of the host, as well power management configuration.

Both host and VM commands return the following:

  • A full description of the data source

  • The units applied to the metric

  • The range of possible values that may be used

For example:

    name_label: cpu0-C1
    name_description: Proportion of time CPU 0 spent in C-state 1
    enabled: true
    standard: true
    min: 0.000
    max: 1.000
    units: Percent
<!--NeedCopy-->

Enable a specific metric

Most metrics are enabled and collected by default, to enable those metrics that are not, enter the following:

xe host-data-source-record data-source=metric name host=hostname
<!--NeedCopy-->

Disable a specific metric

You might not want to collect certain metrics regularly. To disable a previously enabled metric, enter the following:

xe host-data-source-forget data-source=metric name host=hostname
<!--NeedCopy-->

Display a list of currently enabled host metrics

To list the host metrics currently being collected, enter the following:

xe host-data-source-list host=hostname
<!--NeedCopy-->

Display a list of currently enabled VM metrics

To host the VM metrics currently being collected, enter the following:

xe vm-data-source-list vm=vm_name
<!--NeedCopy-->

Use RRDs

XenServer uses RRDs to store performance metrics. These RRDs consist of multiple Round Robin Archives (RRAs) in a fixed size database.

Each archive in the database samples its particular metric on a specified granularity:

  • Every 5 seconds for 10 minutes
  • Every minute for the past two hours
  • Every hour for the past week
  • Every day for the past year

The sampling that takes place every five seconds records actual data points, however the following RRAs use Consolidation Functions instead. The consolidation functions supported by XenServer are:

  • AVERAGE
  • MIN
  • MAX

RRDs exist for individual VMs (including dom0) and the XenServer host. VM RRDs are stored on the host on which they run, or the pool coordinator when not running. Therefore the location of a VM must be known to retrieve the associated performance data.

For detailed information on how to use XenServer RRDs, see the XenServer Software Development Kit Guide.

Analyze RRDs using HTTP

You can download RRDs over HTTP from the XenServer host specified using the HTTP handler registered at /host_rrd or /vm_rrd. Both addresses require authentication either by HTTP authentication, or by providing a valid management API session references as a query argument. For example:

Download a Host RRD.

wget http://server/host_rrd?session_id=OpaqueRef:SESSION HANDLE>
<!--NeedCopy-->

Download a VM RRD.

wget http://server/vm_rrd?session_id=OpaqueRef:SESSION HANDLE>&uuid=VM UUID>
<!--NeedCopy-->

Both of these calls download XML in a format that can be parsed directly.

Analyze RRDs using rrd2csv

In addition to viewing performance metrics in XenCenter, the rrd2csv tool logs RRDs to Comma Separated Value (CSV) format. Man and help pages are provided. To display the rrd2csv tool man or help pages, run the following command:

man rrd2csv
<!--NeedCopy-->

Or

rrd2csv --help
<!--NeedCopy-->

Note:

Where multiple options are used, supply them individually. For example: to return both the UUID and the name-label associated with a VM or a host, call rrd2csv as shown below:

rrd2csv -u -n

The UUID returned is unique and suitable as a primary key, however the name-label of an entity might not necessarily be unique.

The man page (rrd2csv --help) is the definitive help text of the tool.

Available metrics

The following tables list all of the available host and VM metrics.

Notes:

  • Latency over a period is defined as the average latency of operations during that period.
  • The availability and utility of certain metrics are SR and CPU dependent.

Available host metrics

Metric Name Description Condition XenCenter Name
avgqu_sz_<sr-uuid-short> Average I/O queue size (requests). At least one plugged VBD in SR <sr-uuid-short> on the host sr-uuid-short Queue Size
cpu<cpu>-C<cstate> Time CPU cpu spent in C-state cstate in milliseconds. C-state exists on CPU CPU cpu C-state cstate
cpu<cpu>-P<pstate> Time CPU cpu spent in P-state pstate in milliseconds. P-state exists on CPU CPU cpu P-state pstate
cpu<cpu> Utilization of physical CPU cpu (fraction). Enabled by default. CPU cpu exists CPU cpu
cpu_avg Mean utilization of physical CPUs (fraction). Enabled by default. None Average CPU
hostload Host load per physical CPU, where load refers to the number of vCPU(s) in a running or runnable state. None Host CPU Load
inflight_<sr-uuid-short> Number of I/O requests currently in flight. Enabled by default. At least one plugged VBD in SR sr on the host sr Inflight Requests
io_throughput_read_<sr-uuidshort> Data read from SR (MiB/s). At least one plugged VBD in SR sr on the host sr Read Throughput
io_throughput_write_<sr-uuidshort> Data written to the SR (MiB/s). At least one plugged VBD in SR sr on the host sr Write Throughput
io_throughput_total_<sr-uuidshort> All SR I/O (MiB/s). At least one plugged VBD in SR sr on the host sr Total Throughput
iops_read_<sr-uuid-short> Read requests per second. At least one plugged VBD in SR sr on the host sr Read IOPS
iops_write_<sr-uuid-short> Write requests per second. At least one plugged VBD in SR sr on the host sr Write IOPS
iops_total_<sr-uuid-short> I/O requests per second. At least one plugged VBD in SR sr on the host sr Total IOPS
iowait_<sr-uuid-short> Percentage of the time waiting for I/O. At least one plugged VBD in SR sr on the host sr IO Wait
latency_<sr-uuid-short> Average I/O latency (milliseconds). At least one plugged VBD in SR sr on the host sr Latency
loadavg Domain0 load average. Enabled by default None Control Domain Load
memory_free_kib Total amount of free memory (KiB). Enabled by default. None Not present in XenCenter. Replaced by Used Memory.
Not reported by the toolstack. Calculated by XenCenter. Total amount of used memory (KiB). Enabled by default. None Used Memory
memory_reclaimed Host memory reclaimed by squeeze (B). None Reclaimed Memory
memory_reclaimed_max Host memory available to reclaim with squeeze (B). None Potential Reclaimed Memory
memory_total_kib Total amount of memory (KiB) in the host. Enabled by default. None Total Memory
network/latency Interval in seconds between the last two heartbeats transmitted from the local host to all online hosts. Disabled by default. HA Enabled Network Latency
statefile/<vdi_uuid>/latency Turn-around time in seconds of the latest State-File access from the local host. Disabled by default. HA Enabled HA State File Latency
pif_<pif>_rx Bytes per second received on physical interface pif. Enabled by default. PIF exists XenCenter-pifname Receive (see note)
pif_<pif>_tx Bytes per second sent on physical interface pif. Enabled by default. PIF exists XenCenter-pifname Send (see note)
pif_<pif>_rx_errors Receive errors per second on physical interface pif. Disabled by default. PIF exists XenCenter-pifname Receive Errors (see note)
pif_<pif>_tx_errors Transmit errors per second on physical interface pif . Disabled by default PIF exists XenCenter-pifname Send Errors (see note)
pif_aggr_rx Bytes per second received on all physical interfaces. Enabled by default. None Total NIC Receive
pif_aggr_tx Bytes per second sent on all physical interfaces. Enabled by default. None Total NIC Send
pvsaccelerator_evicted Bytes per second evicted from the cache PVSAccelerator Enabled PVS-Accelerator eviction rate
pvsaccelerator_read_hits Reads per second served from the cache PVSAccelerator Enabled PVS-Accelerator hit rate
pvsaccelerator_read_misses Reads per second that cannot be served from the cache PVSAccelerator Enabled PVS-Accelerator miss rate
pvsaccelerator_traffic_client_sent Bytes per second sent by cached PVS clients PVSAccelerator Enabled PVS-Accelerator observed network traffic from clients
pvsaccelerator_traffic_server_sent Bytes per second sent by cached PVS servers PVSAccelerator Enabled PVS-Accelerator observed network traffic from servers
pvsaccelerator_read_total Reads per second observed by the cache PVSAccelerator Enabled PVS-Accelerator observed read rate
pvsaccelerator_traffic_proxy_saved Bytes per second sent by PVSAccelerator instead of the PVS server PVSAccelerator Enabled PVS-Accelerator saved network traffic
pvsaccelerator_space_utilization Percentage of space used by PVSAccelerator on this host, compared to the total size of the cache storage PVSAccelerator Enabled PVS-Accelerator space utilization
running_vcpus The total number of running vCPUs None Number of running vCPUs
running_domains The total number of running domains including dom0 (the control domain of the host) None Number of running domains
sr_<sr>_cache_size Size in bytes of the IntelliCache SR. Enabled by default. IntelliCache Enabled IntelliCache Cache Size
sr_<sr>_cache_hits Cache hits per second. Enabled by default. IntelliCache Enabled IntelliCache Cache Hits
sr_<sr>_cache_misses Cache misses per second. Enabled by default. IntelliCache Enabled IntelliCache Cache Misses
xapi_allocation_kib Memory (KiB) allocation done by the XAPI daemon. Enabled by default. None Agent Memory Allocation
xapi_free_memory_kib Free memory (KiB) available to the XAPI daemon. Enabled by default. None Agent Memory Free
xapi_healthcheck/latency Turn-around time in seconds of the latest XAPI status monitoring call on the local host. Disabled by default. High availability Enabled XenServer High Availability Latency
xapi_live_memory_kib Live memory (KiB) used by XAPI daemon. Enabled by default. None Agent Memory Live
xapi_memory_usage_kib Total memory (KiB) allocated used by XAPI daemon. Enabled by default. None Agent Memory Usage

Available VM metrics

Metric Name Description Condition XenCenter Name
cpu<cpu> Utilization of vCPU cpu (fraction). Enabled by default vCPU cpu exists CPU
cpu_usage Domain CPU usage None cpu_usage
memory Memory currently allocated to VM (Bytes).Enabled by default None Total Memory
memory_target Target of VM balloon driver (Bytes). Enabled by default None Memory target
memory_internal_free Memory used as reported by the guest agent (KiB). Enabled by default None Free Memory
runstate_fullrun Fraction of time that all vCPUs are running. None vCPUs full run
runstate_full_contention Fraction of time that all vCPUs are runnable (that is, waiting for CPU) None vCPUs full contention
runstate_concurrency_hazard Fraction of time that some vCPUs are running and some are runnable None vCPUs concurrency hazard
runstate_blocked Fraction of time that all vCPUs are blocked or offline None vCPUs idle
runstate_partial_run Fraction of time that some vCPUs are running, and some are blocked None vCPUs partial run
runstate_partial_contention Fraction of time that some vCPUs are runnable and some are blocked None vCPUs partial contention
vbd_<vbd>_write Writes to device vbd in bytes per second. Enabled by default VBD vbd exists Disk vbd Write
vbd_<vbd>_read Reads from device vbd in bytes per second. Enabled by default. VBD vbd exists Disk vbd Read
vbd_<vbd>_write_latency Writes to device vbd in microseconds. VBD vbd exists Disk vbd Write Latency
vbd_<vbd>_read_latency Reads from device vbd in microseconds. VBD vbd exists Disk vbd Read Latency
vbd <vbd>_iops_read Read requests per second. At least one plugged VBD for non-ISO VDI on the host Disk vbd Read IOPs
vbd <vbd>_iops_write Write requests per second. At least one plugged VBD for non-ISO VDI on the host Disk vbd Write IOPS
vbd <vbd>_iops_total I/O requests per second. At least one plugged VBD for non-ISO VDI on the host Disk vbd Total IOPS
vbd <vbd>_iowait Percentage of time waiting for I/0. At least one plugged VBD for non-ISO VDI on the host Disk vbd IO Wait
vbd <vbd>_inflight Number of I/O requests currently in flight. At least one plugged VBD for non-ISO VDI on the host Disk vbd Inflight Requests
vbd <vbd>_avgqu_sz Average I/O queue size. At least one plugged VBD for non-ISO VDI on the host Disk vbd Queue Size
vif_<vif>_rx Bytes per second received on virtual interface number vif. Enabled by default. VIF vif exists vif Receive
vif_<vif>_tx Bytes per second transmitted on virtual interface vif. Enabled by default. VIF vif exists vif Send
vif_<vif>_rx_errors Receive errors per second on virtual interface vif. Enabled by default. VIF vif exists vif Receive Errors
vif_<vif>_tx_errors Transmit errors per second on virtual interface vif Enabled by default. VIF vif exists vif Send Errors

Note:

The value of <XenCenter-pif-name> can be any of the following:

  • NIC <pif> - if <pif> contains pif_eth#, where ## is 0–9
  • <pif> - if <pif> contains pif_eth#.## or pif_xenbr## or pif_bond##
  • <Internal> Network <pif> - if <pif> contains pif_xapi##, (note that <Internal> appears as is)
  • TAP <tap> - if <pif> contains pif_tap##
  • xapi Loopback - if <pif> contains pif_lo

Custom fields and tags

XenCenter supports the creation of tags and custom fields, which allows for organization and quick searching of VMs, storage and so on. For more information, see Monitoring System Performance.

Custom searches

XenCenter supports the creation of customized searches. Searches can be exported and imported, and the results of a search can be displayed in the navigation pane. For more information, see Monitoring System Performance.

Determine throughput of physical bus adapters

For FC, SAS and iSCSI HBAs you can determine the network throughput of your PBDs using the following procedure.

  1. List the PBDs on a host.
  2. Determine which LUNs are routed over which PBDs.
  3. For each PBD and SR, list the VBDs that reference VDIs on the SR.
  4. For all active VBDs that are attached to VMs on the host, calculate the combined throughput.

For iSCSI and NFS storage, check your network statistics to determine if there is a throughput bottleneck at the array, or whether the PBD is saturated.

Monitor and manage your deployment