All Products
Search
Document Center

ApsaraDB for Redis:Why is the memory usage of a new ApsaraDB for Redis instance not zero?

Last Updated:Apr 22, 2024

ApsaraDB for Redis works in the same manner as open source Redis. When you create an ApsaraDB for Redis instance, the system generates database metadata that occupies a fraction of storage space on the instance. You can view the occupied space in the ApsaraDB for Redis console.

Memory occupied by metadata:

  • The metadata size of a standard instance is 30 MB to 50 MB.

    Specific Enhanced Edition (Tair) instances may contain more metadata than Community Edition instances. The excess metadata that is approximately dozens of MB in size is used to accelerate queries and collect statistics on hotkeys and large keys.

    Note

    Starting version 24.3.0.0, Tair DRAM-based instances that are compatible with Redis 6.0 can be rolled back within seconds when imperceptible scaling fails. Tair needs to log some metadata. Each logical database generates approximately 5 MB to 6 MB of memory for metadata, which is evenly distributed across all shards. If you use a large number of logical databases or run the SELECT command to switch between different databases, the memory usage of metadata also increases.

    We recommend that you update the version of your instance to 24.3.2.2 or later. Tair has been deeply optimized for the memory usage of metadata. Starting version 24.3.2.2 and later, the memory usage of metadata becomes significantly small.

  • The size of metadata on each shard of a cluster instance is 30 MB to 50 MB. The total size of metadata in a cluster instance is equal to the sum of metadata on each shard of the cluster instance.