This topic describes how to use the cluster management system to view hot shards based on different dimensions.
Prerequisites
You are logged on to the cluster management system of your Lindorm instance. For more information, see Log on to the cluster management system.
Background information
If a large number of files are stored in a database, the database takes a long time to respond to a request. In addition, traffic that is generated for data in the database is not evenly distributed to all nodes. This leads to high workloads on some nodes, hot shards, and hot keys. In this case, the response time of the database further increases and the database performance is degraded. You can use the traffic diagnosis feature in the cluster management system to identify hot shards.
TopRegion analysis based on real-time data
You can use the TopRegion analysis module to query hot shards in real time.
Log on to the cluster management system. In the left-side navigation pane, choose
.In the TopRegion Realtime Analysis section, specify filter conditions, including idc, Group, Server, Sort dimension, and Table name.
The following table describes the dimensions based on which the queried information is sorted.
Dimension
Unit
Description
Total requests
Requests/second
The number of requests sent per second to access a shard.
Read requests
Requests/second
The number of requests sent per second to read a shard.
Write requests
Requests/second
The number of requests sent per second to write a shard.
Shard size
MB
The size of a shard.
File nums
Files
The total numbers of files in each shard.
Read response time
Millisecond
The average response time for requests sent to read a shard.
Write response time
Millisecond
The average response time for requests sent to write a shard.
Memstore Size
MB
The amount of data in the memory
Total request data
KB/second
The amount of data generated by all requests sent per second to access a shard.
Read data
KB/second
The amount of data generated by all read requests sent per second to read a shard.
Write data
KB/second
The amount of data generated by all read requests sent per second to write a shard.
NoteIn the Top field, enter the number of records that can be displayed.
If you turn on the Table aggregation switch, the aggregated data is displayed.
If you turn on the Ascending switch, data is displayed in ascending order based on the selected dimensions.
Click Query.
In this example, Read requests is selected for Sort dimension, TOP is set to 5, and the Ascending and Table aggregation switches are turned on.
In the preceding figure, the top five shards that are accessed by the most read requests are queried. Shards in the same table are aggregated. All shards are sorted in ascending order based on the number of read requests sent to the shards.
TopRegion analysis based on historical snapshots
You can also use the TopRegion analysis module to query hot shards at a specific historical point in time.
In the TopRegion History snapshot section, specify filter conditions, including idc, Group, and History snapshot.
NoteHistory snapshot specifies the historical point in time at which you want to query hot shards. Historical snapshots are recorded at a 30-second interval.
Click Query.
The query results are displayed in the following two sections based on different dimensions:
Request Top: The top tables that are accessed by the most requests within the specified time range and the shards in which the tables are stored are displayed. By default, the top 10 tables are displayed.
Vol Top: The top tables that involve the largest amount of data generated by requests within the specified time range and the shards in which the tables are stored are displayed. By default, the top 10 tables are displayed.
(Optional) Click the icon before a table to view the details of the shard in which the table is stored.