{
  "id": "disk-sizing-heavy-write-scenarios",
  "title": "Disk sizing for heavy write scenarios",
  "url": "https://redis.io/docs/latest/operate/rs/8.0/clusters/optimize/disk-sizing-heavy-write-scenarios/",
  "summary": "Sizing considerations for persistent disk space for heavy throughput databases.",
  "content": "In extreme write scenarios when append-only files (AOF) are enabled, the AOF rewrite process can require considerably more disk space for [database persistence](https://redis.io/docs/latest/operate/rs/databases/configure/database-persistence/).\n\nFor disk size requirements for standard usage, see [Hardware requirements](https://redis.io/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements).\n\n## Estimate required disk space\n\nTo estimate the required persistent disk space for AOF rewrite purposes in extreme write scenarios, use the following formula:\n\n**X (1 + 3Y + Y²)**\n\nWhere:\n- **X** = size of each shard in GB\n- **Y** = number of shards\n\n\n## Examples\n\nThe following examples show how to calculate the persistent disk space required for heavy write scenarios for different database configurations, where:\n\n- **Database size** is the memory limit configured for the database.\n\n- **Number of shards** is the total number of shards (primary shards + replica shards).\n\n### Example 1\n\n- Database size = 10 GB\n- Number of shards = 4\n\n1. Calculate the shard size:\n\n    ```sh\n    Shard size = database size / number of shards\n               = 10 GB / 4 shards\n               = 2.5 GB per shard\n    ```\n\n1. Use the formula to calculate the required persistent disk space:\n\n    ```sh\n    Disk space = X (1 + 3Y + Y²)\n               = 2.5 (1 + 3 × 4 + 4²)\n               = 2.5 (1 + 12 + 16)\n               = 2.5 × 29\n               = 72.5 GB\n    ```\n\n1. Round up to 73 GB of required disk space.\n\n### Example 2\n\n- Database size = 10 GB\n- Number of shards = 16\n\n1. Calculate the shard size:\n\n    ```sh\n    Shard size = database size / number of shards\n               = 10 GB / 16 shards\n               = 0.625 GB per shard\n    ```\n\n1. Use the formula to calculate the required persistent disk space:\n\n    ```sh\n    Disk space = X (1 + 3Y + Y²)\n               = 0.625 (1 + 3 × 16 + 16²)\n               = 0.625 (1 + 48 + 256)\n               = 0.625 × 305\n               = 190.625 GB\n    ```\n\n1. Round up to 191 GB of required disk space.\n\n### Example 3\n\n- Database size = 40 GB\n- Number of shards = 5\n\n1. Calculate the shard size:\n\n    ```sh\n    Shard size = database size / number of shards\n               = 40 GB / 5 shards\n               = 8 GB per shard\n    ```\n\n1. Use the formula to calculate the required persistent disk space:\n\n    ```sh\n    Disk space = X (1 + 3Y + Y²)\n               = 8 (1 + 3 × 5 + 5²)\n               = 8 (1 + 15 + 25)\n               = 8 × 41\n               = 328 GB\n    ```\n\n1. Required disk space: 328 GB.\n\n### Example 4\n\n- Database size = 40 GB\n- Number of shards = 15\n\n1. Calculate the shard size:\n\n    ```sh\n    Shard size = database size / number of shards\n               = 40 GB / 15 shards\n               = 2.67 GB per shard\n    ```\n\n1. Use the formula to calculate the required persistent disk space:\n\n    ```sh\n    Disk space = X (1 + 3Y + Y²)\n               = 2.67 (1 + 3 × 15 + 15²)\n               = 2.67 (1 + 45 + 225)\n               = 2.67 × 271\n               = 723.57 GB\n    ```\n\n1. Round up to 724 GB of required disk space.\n\n\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-07-23T12:05:56-05:00"
}
