Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Viewing DB Instance Metrics

Amazon RDS provides metrics so that you can monitor the health of your DB instances and DB clusters. You can monitor both DB instance metrics and operating system (OS) metrics.

Viewing Metrics by Using the Console

To view DB and OS metrics for a DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose DB Instances.

  3. Select the check box to the left of the DB cluster you need information about. For Show Monitoring, choose the option for how you want to view your metrics from these:

    • Show Multi-Graph View – Shows a summary of DB instance metrics available from Amazon CloudWatch. Each metric includes a graph showing the metric monitored over a specific time span.

    • Show Single Graph View – Shows a single metric at a time with more detail. Each metric includes a graph showing the metric monitored over a specific time span.

    • Show Latest Metrics View – Shows a summary of DB instance metrics without graphs. Full Monitoring View includes an option for full-screen viewing.

    • Enhanced Monitoring – Shows a summary of OS metrics available for a DB instance with Enhanced Monitoring enabled. Each metric includes a graph showing the metric monitored over a specific time span.

    RDS metrics viewing options

    Tip

    To select the time range of the metrics represented by the graphs, use Time Range.

    You can choose any graph to bring up a more detailed view of the graph, using which you can apply metric-specific filters to the metric data.

    Time Range is not available for the Enhanced Monitoring Dashboard.

DB Instance Metrics

Amazon RDS integrates with CloudWatch metrics to provide a variety of DB instance metrics. You can view CloudWatch metrics using the RDS console, CLI, or API.

For a complete list of Amazon RDS metrics, go to Amazon RDS Dimensions and Metrics in the Amazon CloudWatch Developer Guide.

Viewing DB Metrics by Using the CloudWatch CLI

Note

The following CLI example requires the CloudWatch command line tools. For more information on CloudWatch and to download the developer tools, go to the Amazon CloudWatch product page. Note that the StartTime and EndTime values supplied in this example are for illustrative purposes. You must substitute appropriate start and end time values for your DB instance.

To view usage and performance statistics for a DB instance

  • Use the CloudWatch command mon-get-stats with the following parameters:

    
    PROMPT>mon-get-stats FreeStorageSpace --dimensions="DBInstanceIdentifier=mydbinstance" --statistics= Average 
      --namespace="AWS/RDS" --start-time 2009-10-16T00:00:00 --end-time 2009-10-16T00:02:00
    					

Viewing DB Metrics by Using the CloudWatch API

Note that the StartTime and EndTime values supplied in this example are for illustrative purposes. You must substitute appropriate start and end time values for your DB instance.

To view usage and performance statistics for a DB instance

  • Call the CloudWatch API GetMetricStatistics with the following parameters:

    • Statistics.member.1 = Average

    • Namespace = AWS/RDS

    • StartTime = 2009-10-16T00:00:00

    • EndTime = 2009-10-16T00:02:00

    • Period = 60

    • MeasureName = FreeStorageSpace

    Example

    
    http://monitoring.amazonaws.com/
    	?SignatureVersion=2
    	&Action=GetMetricStatistics
    	&Version=2009-05-15
    	&StartTime=2009-10-16T00:00:00
    	&EndTime=2009-10-16T00:02:00
    	&Period=60
    	&Statistics.member.1=Average
    	&Dimensions.member.1="DBInstanceIdentifier=mydbinstance"
    	&Namespace=AWS/RDS
    	&MeasureName=FreeStorageSpace						
    	&Timestamp=2009-10-15T17%3A48%3A21.746Z
    	&AWSAccessKeyId=<AWS Access Key ID>
    	&Signature=<Signature>
    						

Enhanced Monitoring

Amazon RDS provides metrics in real time for the operating system (OS) that your DB instance runs on. You can view the metrics for your DB instance using the console, or consume the Enhanced Monitoring JSON output from CloudWatch Logs in a monitoring system of your choice.

The cost for using Enhanced Monitoring varies depends on several factors:

  • You are only charged for Enhanced Monitoring that exceeds the free tier provided by Amazon CloudWatch Logs. For more information, see Amazon CloudWatch Pricing.

  • A smaller monitoring interval results in more frequent reporting of OS metrics and increases your monitoring cost.

  • Usage costs for Enhanced Monitoring are applied for each DB instance that Enhanced Monitoring is enabled for. Monitoring a large number of DB instances is more expensive than monitoring only a few.

  • DB instances that support a more compute-intensive workload have more OS process activity to report and higher costs for Enhanced Monitoring.

Enhanced Monitoring Availability

  • Enhanced Monitoring is available for the following database engines:

    • Amazon Aurora

    • MariaDB

    • Microsoft SQL Server

    • MySQL version 5.5 or later

    • Oracle

    • PostgreSQL

  • Enhanced monitoring is available for all DB instance classes except for db.t1.micro and db.m1.small.

  • Enhanced Monitoring is available in all regions except for AWS GovCloud (US).

Differences Between CloudWatch and Enhanced Monitoring Metrics

CloudWatch gathers metrics about CPU utilization from the hypervisor for a DB instance, and Enhanced Monitoring gathers its metrics from an agent on the instance. As a result, you might find differences between the measurements, because the hypervisor layer performs a small amount of work. The differences can be greater if your DB instances use smaller instance classes, because then there are likely more virtual machines (VMs) that are managed by the hypervisor layer on a single physical instance. Enhanced Monitoring metrics are useful when you want to see how different processes or threads on a DB instance use the CPU.

Setting Up for and Enabling Enhanced Monitoring

Before You Begin

Enhanced Monitoring requires permission to act on your behalf to send OS metric information to CloudWatch Logs. You grant Enhanced Monitoring the required permissions using an AWS Identity and Access Management (IAM) role.

The first time that you enable Enhanced Monitoring in the console, you can select the Default option for the Monitoring Role property to have RDS create the required IAM role. RDS then automatically creates a role named rds-monitoring-role for you, and uses it for the specified DB instance or Read Replica.

You can also create the required role before you enable Enhanced Monitoring, and then specify your new role's name when you enable Enhanced Monitoring. You must create this required role if you enable Enhanced Monitoring using the AWS CLI or the RDS API.

To create the appropriate IAM role to permit Amazon RDS to communicate with the Amazon CloudWatch Logs service on your behalf, take the following steps.

To create an IAM role for Amazon RDS Enhanced Monitoring

  1. Open the IAM Console at https://console.aws.amazon.com.

  2. In the left navigation pane, choose Roles.

  3. Choose Create New Role.

  4. For Role Name, type a name for your role, for example emaccess. Choose Next Step.

  5. Choose AWS Service Roles, and then scroll to Amazon RDS Role for Enhanced Monitoring. Choose Select.

  6. On the Attach Policy page, choose the AmazonRDSEnhancedMonitoringRole policy, and then choose Next Step.

  7. Review the information, and then choose Create Role.

Enabling and Disabling Enhanced Monitoring

You can enable Enhanced Monitoring when you create a DB instance or Read Replica, or when you modify a DB instance. If you modify a DB instance to enable Enhanced Monitoring, you do not need to reboot your DB instance for the change to take effect.

You can enable Enhanced Monitoring in the RDS console when you do one of the following actions:

  • Launch a DB Instance – You can enable Enhanced Monitoring in the Configure Advanced Settings page.

  • Create Read Replica – You can enable Enhanced Monitoring in the Configure Advanced Settings page.

  • Modify a DB Instance – You can enable Enhanced Monitoring in the Modify DB Instance page.

To enable Enhanced Monitoring by using the RDS console, scroll to the Monitoring section and do the following:

  1. Set the Enable Enhanced Monitoring property for your DB instance or Read Replica to Yes.

  2. Set the Monitoring Role property to the IAM role that you created to permit Amazon RDS to communicate with Amazon CloudWatch Logs for you, or choose Default to have RDS create a role for you named rds-monitoring-role.

  3. Set the Granularity property to the interval, in seconds, between points when metrics are collected for your DB instance or Read Replica. The Granularity property can be set to one of the following values: 1, 5, 10, 15, 30, or 60.

To disable Enhanced Monitoring, set the Enable Enhanced Monitoring property to No.

Enable Enhanced Monitoring

Enabling Enhanced Monitoring does not require your DB instance to restart.

Note

The fastest that the RDS console refreshes is every 5 seconds. If you set the granularity to 1 second in the RDS console, you still see updated metrics only every 5 seconds. You can retrieve 1 second metric updates by using CloudWatch Logs.

Viewing Enhanced Monitoring

You can view OS metrics reported by Enhanced Monitoring in the RDS console by choosing the Enhanced Monitoring Dashboard view for Show Monitoring. Two views are available: Dashboard view, which shows graphs of the OS metrics, and Process List view, which shows the processes running on the DB instance and their related metrics including CPU percentage, memory usage, and so on.

Dashboard view is shown following.

Dashboard view

Process List view is shown following.

Process list view

The Enhanced Monitoring metrics shown in the Process List view are organized as follows:

  • RDS child processes – Shows a summary of the RDS processes that support the DB instance, for example aurora for Amazon Aurora DB clusters and mysqld for MySQL DB instances. Process threads appear nested beneath the parent process. Process threads show CPU utilization only as other metrics are the same for all threads for the process. The console displays a maximum of 100 processes and threads. The results are a combination of the top CPU consuming and memory consuming processes and threads. If there are more than 50 processes and more than 50 threads, the console displays the top 50 consumers in each category. This display helps you identify which processes are having the greatest impact on performance.

  • RDS processes – Shows a summary of the resources used by the RDS management agent, diagnostics monitoring processes, and other AWS processes that are required to support RDS DB instances.

  • OS processes – Shows a summary of the kernel and system processes, which generally have minimal impact on performance.

The monitoring data that is shown in the RDS console is retrieved from AWS CloudWatch logs. You can also retrieve the metrics for a DB instance as a log stream from CloudWatch logs. For more information, see Viewing Enhanced Monitoring by Using CloudWatch Logs.

Enhanced Monitoring metrics are not returned during the following:

  • A failover of the DB instance.

  • Changing the instance class of the DB instance (scale compute).

Enhanced Monitoring metrics are returned during a reboot of a DB instance because only the database engine is rebooted. Metrics for the operating system are still reported.

Viewing Enhanced Monitoring by Using CloudWatch Logs

After you have enabled Enhanced Monitoring for your DB instance, you can view the metrics for your DB instance using CloudWatch Logs, with each log stream representing a single DB instance being monitored. The log stream identifier is the resource identifier (DbiResourceId) for the DB instance.

To view Enhanced Monitoring log data

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. If necessary, choose the region that your DB instance is in. For more information, go to Regions and Endpoints in the Amazon Web Services General Reference.

  3. Choose Logs in the navigation pane.

  4. Choose RDSOSMetrics from the list of log groups.

  5. Choose the log stream that you want to view from the list of log streams.

Available OS Metrics

The following tables list the OS metrics available using CloudWatch logs.

Metrics for MySQL, MariaDB, Amazon Aurora, and PostgreSQL DB instances
GroupMetricsDescription

General

engine

The database engine for the DB instance.

instanceID

The DB instance identifier.

instanceResourceID

A region-unique, immutable identifier for the DB instance, also used as the log stream identifier.

numVCPUs

The number of virtual CPUs for the DB instance.

timestamp

The time at which the metrics were taken.

uptime

The amount of time that the DB instance has been active.

version

The version of the OS metrics' stream JSON format.

cpuUtilization

guest

The percentage of CPU in use by guest programs.

idle

The percentage of CPU that is idle.

irq

The percentage of CPU in use by software interrupts.

nice

The percentage of CPU in use by programs running at lowest priority.

steal

The percentage of CPU in use by other virtual machines.

system

The percentage of CPU in use by the kernel.

total

The total percentage of the CPU in use. This value excludes the nice value.

user

The percentage of CPU in use by user programs.

wait

The percentage of CPU unused while waiting for I/O access.

diskIO

avgQueueLen

The number of requests waiting in the I/O device's queue.

This metric is not available for Amazon Aurora.

avgReqSz

The average request size, in kilobytes.

This metric is not available for Amazon Aurora.

await

The number of milliseconds required to respond to requests, including queue time and service time.

This metric is not available for Amazon Aurora.

device

The identifier of the disk device in use.

This metric is not available for Amazon Aurora.

readIOsPS

The number of read operations per second.

This metric is not available for Amazon Aurora.

readKb

The total number of kilobytes read.

This metric is not available for Amazon Aurora.

readKbPS

The number of kilobytes read per second.

This metric is not available for Amazon Aurora.

rrqmPS

The number of merged read requests queued per second.

This metric is not available for Amazon Aurora.

tps

The number of I/O transactions per second.

This metric is not available for Amazon Aurora.

util

The percentage of CPU time during which requests were issued.

This metric is not available for Amazon Aurora.

writeIOsPS

The number of write operations per second.

This metric is not available for Amazon Aurora.

writeKb

The total number of kilobytes written.

This metric is not available for Amazon Aurora.

writeKbPS

The number of kilobytes written per second.

This metric is not available for Amazon Aurora.

wrqmPS

The number of merged write requests queued per second.

This metric is not available for Amazon Aurora.

fileSys

maxFiles

The maximum number of files that can be created for the file system.

mountPoint

The path to the file system.

name

The name of the file system.

total

The total number of disk space available for the file system, in kilobytes.

used

The amount of disk space used by files in the file system, in kilobytes.

usedFilePercent

The percentage of available files in use.

 

usedFiles

The number of files in the file system.

 

usedPercent

The percentage of the file-system disk space in use.

 

loadAverageMinute

fifteen

The number of processes requesting CPU time over the last 15 minutes.

 

five

The number of processes requesting CPU time over the last 5 minutes.

 

one

The number of processes requesting CPU time over the last minute.

 

memory

active

The amount of assigned memory, in kilobytes.

 

buffers

The amount of memory used for buffering I/O requests prior to writing to the storage device, in kilobytes.

 

cached

The amount of memory used for caching file system–based I/O.

 

dirty

The amount of memory pages in RAM that have been modified but not written to their related data block in storage, in kilobytes.

 

free

The amount of unassigned memory, in kilobytes.

 

hugePagesFree

The number of free huge pages. Huge pages are a feature of the Linux kernel.

 

hugePagesRsvd

The number of committed huge pages.

 

hugePagesSize

The size for each huge pages unit, in kilobytes.

 

hugePagesSurp

The number of available surplus huge pages over the total.

 

hugePagesTotal

The total number of huge pages for the system.

 

inactive

The amount of least-frequently used memory pages, in kilobytes.

 

mapped

The total amount of file-system contents that is memory mapped inside a process address space, in kilobytes.

 

pageTables

The amount of memory used by page tables, in kilobytes.

 

slab

The amount of reusable kernel data structures, in kilobytes.

 

total

The total amount of memory, in kilobytes.

 

writeback

The amount of dirty pages in RAM that are still being written to the backing storage, in kilobytes.

 

network

interface

The identifier for the network interface being used for the DB instance.

 

rx

The number of packets received.

 

tx

The number of packets uploaded.

 

processList

cpuUsedPc

The percentage of CPU used by the process.

 

id

The identifier of the process.

 

memoryUsedPc

The amount of memory used by the process, in kilobytes.

 

name

The name of the process.

 

parentID

The process identifier for the parent process of the process.

 

rss

The amount of RAM allocated to the process, in kilobytes.

 

tgid

The thread group identifier, which is a number representing the process ID to which a thread belongs. This identifier is used to group threads from the same process.

 

vss

The amount of virtual memory allocated to the process, in kilobytes.

 

swap

cached

The amount of swap memory, in kilobytes, used as cache memory.

 

free

The total amount of swap memory free, in kilobytes.

 

total

The total amount of swap memory available, in kilobytes.

 

tasks

blocked

The number of tasks that are blocked.

 

running

The number of tasks that are running.

 

sleeping

The number of tasks that are sleeping.

 

stopped

The number of tasks that are stopped.

 

total

The total number of tasks.

 

zombie

The number of child tasks that are inactive with an active parent task.

 
Metrics for Microsoft SQL Server DB instances
GroupMetricsDescription

General

engine

The database engine for the DB instance.

instanceID

The DB instance identifier.

instanceResourceID

A region-unique, immutable identifier for the DB instance, also used as the log stream identifier.

numVCPUs

The number of virtual CPUs for the DB instance.

timestamp

The time at which the metrics were taken.

uptime

The amount of time that the DB instance has been active.

version

The version of the OS metrics' stream JSON format.

cpuUtilization

idle

The percentage of CPU that is idle.

kern

The percentage of CPU in use by the kernel.

user

The percentage of CPU in use by user programs.

disks

name

The identifier for the disk.

totalKb

The total space of the disk, in kilobytes.

usedKb

The amount of space used on the disk, in kilobytes.

usedPc

The percentage of space used on the disk.

availKb

The space available on the disk, in kilobytes.

availPc

The percentage of space available on the disk.

rdCountPS

The number of read operations per second

rdBytesPS

The number of bytes read per second.

wrCountPS

The number of write operations per second.

wBytesPS

The amount of bytes written per second.

memory

commitToKb

The amount of pagefile-backed virtual address space in use, that is, the current commit charge. This value is composed of main memory (RAM) and disk (pagefiles).

commitLimitKb

The maximum possible value for the commitTotKb metric. This value is the sum of the current pagefile size plus the physical memory available for pageable contents–excluding RAM that is assigned to non-pageable areas.

commitPeakKb

The largest value of the commitTotKb metric since the operating system was last started.

kernTotKb

The sum of the memory in the paged and non-paged kernel pools, in kilobytes.

kernPagedKb

The amount of memory in the paged kernel pool, in kilobytes.

kernNonpagedKb

The amount of memory in the non-paged kernel pool, in kilobytes.

pageSize

The size of a page, in bytes.

physTotKb

The amount of physical memory, in kilobytes.

physAvailKb

The amount of available physical memory, in kilobytes.

sqlServerTotKb

The amount of memory committed to Microsoft SQL Server, in kilobytes.

sysCacheKb

The amount of system cache memory, in kilobytes.

network

interface

The identifier for the network interface being used for the DB instance.

rdBytesPS

The number of bytes received per second.

wrBytesPS

The number of bytes sent per second.

processList

cpuUsedPc

The percentage of CPU used by the process.

memUsedPc

The amount of memory used by the process, in kilobytes.

name

The name of the process.

pid

The identifier of the process. This value is not present for processes that are owned by Amazon RDS.

ppid

The process identifier for the parent of this process. This value is only present for child processes.

tid

The thread identifier. This value is only present for threads. The owning process can be identified by using the pid value.

workingSetKb

The amount of memory in the private working set plus the amount of memory that is in use by the process and can be shared with other processes, in kilobytes.

workingSetPrivKb

The amount of memory that is in use by a process, but can't be shared with other processes, in kilobytes.

workingSetShareableKb

The amount of memory that is in use by a process and can be shared with other processes, in kilobytes.

virtKb

The amount of virtual address space the process is using, in kilobytes. Use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages.

system

handles

The number of handles that the system is using.

processes

The number of processes running on the system.

threads

The number of threads running on the system.