Updated on 2023-07-06 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

Table 3 Microsoft SQL Server database file types

DB Engine

File Type

Microsoft SQL Server

Log files: database error log, transaction log, and trace files

Data files: database content 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 due to a large number of sorting queries executed by applications.
    2. A large number of binlog files are generated and occupy space due to large amounts of add, delete, and modify operations in a short period.
    3. A large number of binlog files are generated due to 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.