All Products
Search
Document Center

PolarDB:Improve the read and write performance of cold data

Last Updated:May 28, 2024

This topic describes how to improve the read and write performance of cold data.

Background information

Due to the high latency of OSS, the read and write performance of cold data is degraded. To address this issue, PolarDB for PostgreSQL creates a small amount of materialized cache space on the disk to store cold metadata and I/O merging. To enhance the read and write speed of cold data, you can enlarge the materialized cache on the console based on your data volume and use cases.

Procedure

On the console, find the polar_smgrcache_size parameter and adjust its value. The adjustment takes effect immediately without the need to restart the database. This parameter indicates the size of the cache, in GB. Its default value is 1 GB. If you set this parameter to 0, the cache is disabled. We recommend that you do not set this parameter to 0.

The following table describes the polar_smgrcache_size parameter settings:

Parameter value

Cache size

0

0 GB (Materialized caching is disabled for cold data.)

1

1 GB

2

2 GB

128

128 GB (maximum value)