Oracle NoSQL Database Cloud Service Metrics

Oracle NoSQL Database Cloud Service emits metrics using the metric namespace oci_nosql.

Metrics for Oracle NoSQL Database Cloud Service include the following dimensions:
  • RESOURCEID
    The OCID of the NoSQL Table in the Oracle NoSQL Database Cloud Service.

    Note:

    OCID is an Oracle-assigned unique ID that is included as part of the resource's information in both the console and API.
  • TABLENAME

    The name of the NoSQL table in the Oracle NoSQL Database Cloud Service.

Oracle NoSQL Database Cloud Service sends metrics to the Oracle Cloud Infrastructure Monitoring Service. You can view or create alarms on these metrics using the Oracle Cloud Infrastructure Console SDKs or CLI.

Table 7-1 Oracle NoSQL Database Cloud Service Metrics

Metric Metric Display Name Unit Description Dimensions
ReadUnits Read Units Units The number of read units consumed during this period. resourceId tableName
WriteUnits Write Units Units The number of write units consumed during this period. resourceId tableName
StorageGB Storage Size GB The maximum amount of storage consumed by the table. As this information is generated hourly, you may see values that are out of date in between the refresh points. resourceId tableName
ReadThrottleCount Read Throttle Count The number of read throttling exceptions on this table in the time period. resourceId tableName
WriteThrottleCount Write Throttle Count The number of write throttling exceptions on this table in the time period. resourceId tableName
StorageThrottleCount Storage Throttle Count The number of storage throttling exceptions on this table in the time period. resourceId tableName
MaxShardSizeUsagePercent Maximum Shard Size Usage Percentage The ratio of the space used in the shard over the total space allocated to the shard. This is specific to a table and will be the highest value across all shards. resourceId tableName

Additionally, you can publish custom metrics as per your requirement. For example, you can set up metrics to capture application transaction latency (time spent per completed transaction) and then post that data to the Monitoring service.

NDCS Metrics Explained

Oracle NoSQL Database Cloud Service sends metrics to the Oracle Cloud Infrastructure Monitoring Service.

Read Units:

The number of read units consumed during this period. It is the throughput for up to 1 KB of data per second for an eventually consistent read operation. If your data is greater than 1 KB it will require multiple read units to read it. The Read Unit metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of readmetric.png follows
Description of the illustration readmetric.png

Write Units:

The number of write units consumed during this period. It is the throughput for up to 1 KB of data per second for a write operation. Write operations are triggered during insert, update, and delete operations. If your data is greater than 1 KB it will require multiple read units to write it. The Write Unit metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of writemetric.png follows
Description of the illustration writemetric.png

StorageGB:

The maximum amount of storage consumed by the table. The Storage metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of storagemetric.png follows
Description of the illustration storagemetric.png

ReadThrottleCount:

This gives a count of the number of read throttling exceptions on the given table in the time period. A throttling exception usually indicates that the provisioned read throughput has been exceeded. If you get these frequently, then you should consider increasing the Read Units on your table. The Read throttle count metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of readthrottlemetric.png follows
Description of the illustration readthrottlemetric.png

WriteThrottleCount:

This gives a count of the number of write throttling exceptions on the given table in the time period. A throttling exception usually indicates that the provisioned write throughput has been exceeded. If you get these frequently, then you should consider increasing the Write Units on your table. The Write throttle count metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of writethrottlemetric.png follows
Description of the illustration writethrottlemetric.png

StorageThrottleCount:

This gives a count of the number of storage throttling exceptions on the given table in the time period. A throttling exception usually indicates that the provisioned storage capacity has been exceeded. If you get these frequently, then you should consider increasing the storage capacity of your table. The Storage throttle count metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of storagethrottlemetric.png follows
Description of the illustration storagethrottlemetric.png

MaxShardSizeUsagePercent

The highest usage of space in a shard for a specific table, as a percentage of space used in that shard.

Note:

Oracle NoSQL Database Cloud Service hashes keys to shards to provide distribution over a collection of storage nodes that provide storage for the tables. Although not directly visible to you, Oracle NoSQL Database Cloud Service tables are sharded and replicated for availability and performance. A shard key either 100% matches the primary key or is a subset of the primary key.. All records sharing a shard key are co-located to achieve data locality.

When maxShardSizeUsagepercent reaches 100, you can no longer do a write operation in the table. You have to increase the storage capacity to perform a write into the table. This metric helps to determine if a storage hotspot exists for your NoSQL table.

This scenario happens because of an imbalance in how the table data is stored across shards. An imbalance can occur when a majority of the table data is stored in a subset of the shards. The storage in a NoSQL database is sharded, and the shard key is part of the table definition. In hierarchical tables, the parent and child tables share the same shard key. If you have a parent table with child tables, all the records share the same shard key. So all of these data will be stored together. If a parent table has fewer children, it occupies less storage space in a single shard. Due to this imbalance, certain shards can contain much more data than other shards.

At a certain point, one shard will have the highest usage of space for a specific table and the percentage used in that shard is the MaxShardSizeUsagePercent. The maxShardSizeUsagepercent metric chart for a table is shown below. The metric is taken every minute and the metric charts are plotted for an interval of 5 minutes by default.
Description of maxshardusageprct.png follows
Description of the illustration maxshardusageprct.png

In addition to viewing the chart for a metric, you have the following options.
Description of metric-options.png follows
Description of the illustration metric-options.png

You can get the table view to check the value of a metric at a given point in time.
Description of tableview.png follows
Description of the illustration tableview.png

Monitoring the MaxShardSizeUsagePercent metric

You have to periodically monitor this chart to know if the maxShardSizeUsagepercent is reached or not. Proactively you can create an alarm for this metric.
Description of alarm-crt-1.png follows
Description of the illustration alarm-crt-1.png

That is you should trigger an alarm when the metric reaches a particular value, say for example 90 percent.
Description of alarm-crt-2.png follows
Description of the illustration alarm-crt-2.png

OCI alarm uses OCI notification service to send notifications. Usually, the alarm will be configured to send notifications through configured email. When maxShardSizeUsagepercent reaches 90 percent, an email notification is sent.
Description of alarm-crt-3.png follows
Description of the illustration alarm-crt-3.png

See Managing Alarms and Notifications for more details.

When there is an imbalance in the way your table data is distributed across shards, you will not be able to utilize the storage capacity allocated to your table to its maximum. In this scenario, maxShardSizeUsagepercent reaches the value of 100 even without utilizing the entire storage allocated to the table. You are now required to add more storage to continue writing on your table. This scenario can be avoided by following some guidelines while designing your table.
  • Decide on the correct shard key for your table. The attributes with high cardinality are a good choice for shard keys.
  • Limit the number of child tables to avoid a potential shard storage imbalance situation.