Help Center/ Relational Database Service/ User Guide (Ankara Region)/ FAQs/ Resource and Disk Management/ Which Types of Logs and Files Occupy RDS Storage Space?
Updated on 2024-04-11 GMT+08:00

Which Types of Logs and Files Occupy RDS Storage Space?

The following logs and files occupy RDS storage space.

Table 1 MySQL database file types

DB Engine

File Type

MySQL

Log files: database undo-log, redo-log, and binlog files

Data files: database content files and index files

Other files: ibdata, ib_logfile0, and temporary files

Table 2 PostgreSQL database file types

DB Engine

File Type

PostgreSQL

Log files: database error log and transaction log files

Data files: database content, index, replication slot data, transaction status data, and database configuration files

Other files: temporary files

Solution

  1. If the original storage space is insufficient as your services grow, scale up storage space of your DB instance.
  2. If data occupies too much storage space, run DROP, TRUNCATE, or DELETE+OPTIMIZE TABLE to delete useless historical table data to release storage space. If no historical data can be deleted, scale up your storage space.
  3. If temporary files generated by sorting queries occupy too much storage space, optimize your SQL query statements.
    1. A large number of temporary files are generated if there are a large number of sorting queries executed by applications.
    2. A large number of binlog files are generated and occupy space if there are large amounts of insert, delete, and update operations in a short period.
    3. A large number of binlog files are generated if there are a large number of transactions and write operations.
  4. Use Cloud Eye to monitor the size, usage, and utilization of storage space of your DB instance and set alarm policies.