How Do I View the Used Storage of My TaurusDB Instance?
TaurusDB decouples compute and storage, so data is stored in the shared storage. You can view the used storage of your instance on the console, which is updated every 30 minutes.
Storage is calculated differently for TaurusDB and open-source MySQL. To query the used storage of an open-source MySQL instance, run select sum(data_length+index_length+data_free) from information_schema.tables;
To query the used storage of a TaurusDB instance, log in to the TaurusDB console or run show spaceusage;
Viewing the Used Storage of a TaurusDB Instance on the Console
- Log in to the management console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner of the page and choose Databases > TaurusDB.
- On the Instances page, click the instance name to go to the Basic Information page.
- In the Storage and Backup > Storage Space area, view the used storage of your instance.
Figure 1 Viewing the used storage of a DB instance
- Storage space
- The total and used storage of your yearly/monthly instance is displayed.
- If this storage is used up, storage grows as data volume increases and you will be billed on a pay-per-use basis for any additional storage. To keep costs down, make sure you scale up storage in a timely manner so you can take advantage of yearly/monthly rates.
- Backup space:
TaurusDB provides free backup storage equal to the amount of the used storage of your pay-per-use instances or the purchased storage of your yearly/monthly instance.
- Storage space
Viewing the Used Storage of a TaurusDB Instance Through the CLI
After connecting to a TaurusDB instance, run the following command to view its used storage:
show spaceusage;
The following table describes the calculation items of TaurusDB instance storage.
information_schema cannot be updated in real time. Before a query, run the following command to update it:
set information_schema_stats_expiry = 0;
Item |
Command |
Description |
---|---|---|
Table data |
select sum(data_length+index_length+data_free) from information_schema.tables; |
Size of table data. If the statistics data is not updated, the result may be inaccurate. Open-source MySQL uses this command to obtain the used storage of a DB instance. |
Pre-allocated table space |
select count(*) from information_schema.tables; |
Pre-allocated space of tables. The statement is used to query the number of tables and the total pre-allocated space of tables is (Number of tables x 4 MB). The system pre-allocates 4 MB of storage to each table. |
Pre-allocated partition space |
select count(*) from INFORMATION_SCHEMA.PARTITIONS where PARTITION_NAME is not null; |
Pre-allocated space of partitions. The statement is used to query the number of partitions and the total pre-allocated space of partitions is (Number of partitions x 4 MB). The system pre-allocates 4 MB of storage to each partition. |
Binlog |
show binary logs; |
Total size of all binlog files. |
Redolog |
show lsninfo; |
flushed_to_disk_lsn- truncate_lsn |
Undo space |
select sum(INITIAL_SIZE) as undo_space from information_schema.files where file_type='UNDO LOG'; |
Undo space. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot