AWS Monitoring helps you gain observability into your AWS environment
Amazon Relational Database Service (RDS) is a cloud-native relational database service that is fully managed and eliminates the need for users to manage a database themselves. Amazon RDS facilitates this by automating most management-related operations and letting users control this via the configuration. Among other things, users can scale a database up and down, create multiple instances for high availability, take backups automatically to prevent data loss, and spin up new service instances when one or more fail. This makes concentrating on the business and product easier by outsourcing database management.
In addition to its management features, Amazon RDS also supports several databases, including PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, and Amazon Aurora. Irrespective of the database you want to use, or a combination, you can easily provision them using Amazon RDS.
Even though most of the database management is automated, we still need to keep track of performance to avoid slowing down the system and guarantee the best user experience possible. Amazon RDS enables this by exposing various metrics that you can monitor to understand and track the performance as well as the health of your system. In this article, we will examine a few of these metrics and discuss why you need to monitor them.
The following are some of the key metrics to monitor for the Amazon RDS database service to function smoothly. Also, some of these metrics can help improve and optimize your code’s performance via the database’s usage patterns and how your queries are performing.
This metric tells us the available memory for the queries to run. Each of the supported database systems has its metric for this. Amazon RDS exposes the free memory metric irrespective of the underlying database system. For example, for MariaDB, MySQL, Oracle, and PostgreSQL, this metric is read from the MemAvailable metric value in the /proc/meminfo file.
Based on this metric, we can see how much memory our queries consume and if we need to reduce memory usage. You can set up Amazon RDS to elastically increase or decrease memory for the database up to a given limit. Because memory usage is part of the billing for RDS, it is wise to keep a check on free memory and optimize your limits to reduce costs.
This metric gives us the count or the number of client network connections that are connected to the database. Typically, the actual number of database connections can be higher than this number since the metric doesn't account for a few connections, such as:
When you configure the maximum number of allowed connections to the database, we should have a few extra connections available for all such requirements. This metric helps you continually understand how many connections you are using so that you can scale them up or down as needed.
This metric tells us what percentage of the CPU the database is using. For the same workload, this number can vary depending on the underlying database engine. But this should give you a fair idea of how much CPU capacity you actually need versus how much is allocated.
This metric, similar to the CPU utilization metric, gives us the amount of storage space available for storing our data. As you store more data, you may need to periodically keep increasing the storage space so that you don't run into "disk full" errors.
The read and write latencies indicate the speed of the underlying storage layer. This metric is represented either in seconds or milliseconds. Read latency is the amount of time taken to read a unit of data from the disk, and write latency is the amount of time taken to write a unit of data to the disk. If this is too huge and is affecting the performance of the system, consider upgrading to faster storage devices.
These metrics tell us how much traffic is incoming and outgoing from our Amazon RDS instances. The receive throughput represents the traffic incoming to the database instance. This will include the client or customer traffic as well as Amazon RDS's traffic used for housekeeping and other features, such as replication and AWS RDS monitoring jobs.
The transmit throughput represents the traffic going out from the database instance. Similar to the receive throughput, this includes both the customer traffic and Amazon RDS's own traffic.
These metrics are represented in bytes/second. If this number is too low, it might mean the movement of data into and out of the database instances is too slow. In this case, you might want to upgrade the network interfaces or increase the limits for better performance.
These two metrics denote the average number of disk I/O operations per second. The read input/output operations per second (IOPS) metric gives us the average number of disk read operations per second, and the write IOPS metric tells us the average number of disk write operations per second.
Depending on the workload on the database instance, these numbers have to be relatively high so that they don't cause any slowdown in system performance. If required, you may want to upgrade the storage devices for a better IOPS rate.
Several key metrics are available in the Amazon Relational Database Service that help you improve the performance of your systems. There are additional metrics you can monitor in Amazon RDS, but the few discussed above are the most important and also the most basic metrics to start with.
Depending on the size of your system and use cases, consider monitoring other metrics as well and keep optimizing both the code and the database configuration for improved performance.
What are the key Amazon EBS metrics to monitor? Learn more about Amazon EBS monitoring and the key EBS metrics to track for better insights.➤
AWS lambda monitoring run applications without the added complexity of managing servers. Learn more about the key metrics to monitor for AWS lambda➤
Write for Site24x7 is a special writing program that supports writers who create content for Site24x7 “Learn” portal. Get paid for your writing.Apply Now