{
  "schema_version": 2,
  "id": "operate/rs/clusters/optimize/disk-sizing-heavy-write-scenarios",
  "title": "Disk sizing for heavy write scenarios",
  "url": "https://redis.io/docs/latest/operate/rs/clusters/optimize/disk-sizing-heavy-write-scenarios/",
  "summary": "Sizing considerations for persistent disk space for heavy throughput databases.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-24T10:14:16+01:00",
  "page_type": "content",
  "content_hash": "85bce486dab65239966defe1737c3d2b594426c87eb60eaa1d2f1875b86ca541",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "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)."
    },
    {
      "id": "estimate-required-disk-space",
      "title": "Estimate required disk space",
      "role": "content",
      "text": "To 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"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "The 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)."
    },
    {
      "id": "example-1",
      "title": "Example 1",
      "role": "example",
      "text": "- Database size = 10 GB\n- Number of shards = 4\n\n1. Calculate the shard size:\n\n    [code example]\n\n1. Use the formula to calculate the required persistent disk space:\n\n    [code example]\n\n1. Round up to 73 GB of required disk space."
    },
    {
      "id": "example-2",
      "title": "Example 2",
      "role": "example",
      "text": "- Database size = 10 GB\n- Number of shards = 16\n\n1. Calculate the shard size:\n\n    [code example]\n\n1. Use the formula to calculate the required persistent disk space:\n\n    [code example]\n\n1. Round up to 191 GB of required disk space."
    },
    {
      "id": "example-3",
      "title": "Example 3",
      "role": "example",
      "text": "- Database size = 40 GB\n- Number of shards = 5\n\n1. Calculate the shard size:\n\n    [code example]\n\n1. Use the formula to calculate the required persistent disk space:\n\n    [code example]\n\n1. Required disk space: 328 GB."
    },
    {
      "id": "example-4",
      "title": "Example 4",
      "role": "example",
      "text": "- Database size = 40 GB\n- Number of shards = 15\n\n1. Calculate the shard size:\n\n    [code example]\n\n1. Use the formula to calculate the required persistent disk space:\n\n    [code example]\n\n1. Round up to 724 GB of required disk space."
    }
  ],
  "examples": [
    {
      "id": "example-1-ex0",
      "language": "sh",
      "code": "Shard size = database size / number of shards\n               = 10 GB / 4 shards\n               = 2.5 GB per shard",
      "section_id": "example-1"
    },
    {
      "id": "example-1-ex1",
      "language": "sh",
      "code": "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",
      "section_id": "example-1"
    },
    {
      "id": "example-2-ex0",
      "language": "sh",
      "code": "Shard size = database size / number of shards\n               = 10 GB / 16 shards\n               = 0.625 GB per shard",
      "section_id": "example-2"
    },
    {
      "id": "example-2-ex1",
      "language": "sh",
      "code": "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",
      "section_id": "example-2"
    },
    {
      "id": "example-3-ex0",
      "language": "sh",
      "code": "Shard size = database size / number of shards\n               = 40 GB / 5 shards\n               = 8 GB per shard",
      "section_id": "example-3"
    },
    {
      "id": "example-3-ex1",
      "language": "sh",
      "code": "Disk space = X (1 + 3Y + Y²)\n               = 8 (1 + 3 × 5 + 5²)\n               = 8 (1 + 15 + 25)\n               = 8 × 41\n               = 328 GB",
      "section_id": "example-3"
    },
    {
      "id": "example-4-ex0",
      "language": "sh",
      "code": "Shard size = database size / number of shards\n               = 40 GB / 15 shards\n               = 2.67 GB per shard",
      "section_id": "example-4"
    },
    {
      "id": "example-4-ex1",
      "language": "sh",
      "code": "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",
      "section_id": "example-4"
    }
  ]
}
