{
  "slug": "leaky-bucket-meter",
  "term": "Leaky-bucket meter",
  "aliases": [
    "Leaky bucket",
    "Leaky bucket as a meter"
  ],
  "definition": "A leaky-bucket meter tracks work as a level that rises with charges and drains at a configured rate to assess conformance.",
  "note": "Mechanism: work increases the level while elapsed time reduces it toward zero. This is the meter interpretation of a leaky bucket, not a promise of uniformly spaced completions. QEMU v9.2.0 uses this accounting to delay disk I/O and supports bursts. [qemu-code] [qemu-doc]\n\nAccounting: with QEMU iops-size set to 4096 bytes, a 6144-byte request costs 1.5 operations; requests of at most 4096 bytes cost one unit. Drives in one throttle group share limits on their combined I/O. [qemu-code] [qemu-doc]",
  "limitations": [
    {
      "text": "A limiter's charging and waiting rules must be distinguished from the storage device's completion behavior.",
      "citationIds": [
        "qemu-code"
      ]
    }
  ],
  "related": [
    "token-bucket",
    "iops",
    "io-request-size",
    "queue-depth"
  ],
  "citations": [
    {
      "id": "qemu-doc",
      "title": "QEMU v9.2.0: disk-I/O throttling, operation charging and throttle groups",
      "url": "https://raw.githubusercontent.com/qemu/qemu/v9.2.0/docs/throttle.txt",
      "accessed": "2026-11-12"
    },
    {
      "id": "qemu-code",
      "title": "QEMU v9.2.0: throttle_leak_bucket, throttle_compute_wait and throttle_account",
      "url": "https://raw.githubusercontent.com/qemu/qemu/v9.2.0/util/throttle.c",
      "accessed": "2026-11-12"
    },
    {
      "id": "hesela-bursts",
      "title": "Hesela: rate limits, burst budgets and shared SSD queues",
      "url": "https://hesela.com/analyses/ssd-fairness-shared-queues/#rate-burst-scope",
      "accessed": "2026-11-12"
    }
  ],
  "provenance": [
    "Pinned QEMU v9.2.0 source review; no virtual-machine benchmark. Documentary default bucket sizes and exact burst-duration examples are not reproduced."
  ],
  "status": "shipping",
  "advantages": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-12"
}
