{
  "slug": "llama",
  "term": "LLAMA",
  "aliases": [
    "Latch-Free, Log-Structured, Access-Method Aware"
  ],
  "definition": "LLAMA is a research cache and storage subsystem that separates logical page identity from location and supports latch-free updates over a log-structured store.",
  "note": "Layers: A shared mapping table connects page identifiers to memory or storage. Bw-tree supplies indexed record access above this substrate; LLAMA is not itself a complete transactional database. [llama-paper] [bw-paper]\n\nFlush protocol: Reserve buffer space before publishing a flush delta with compare-and-swap, then fill the reservation. A failed comparison leaves an invalidated reservation. Storage I/O must wait for active buffer writers. This keeps an unfinished copy from reaching storage. [llama-paper]\n\nDurability: Flush returns after buffering, not necessarily persistence. Mk-Stable establishes durability through its supplied storage address. Internal system transactions support structural changes, not general user-transaction isolation; the access method remains responsible for WAL ordering. [llama-paper]\n\nRecovery: A mapping-table checkpoint plus storage-log replay restores page locations. This is distinct from the transaction manager's recovery log and commit decision. [llama-paper]",
  "status": "research",
  "advantages": [],
  "limitations": [],
  "related": [
    "bw-tree",
    "compare-and-swap",
    "write-ahead-log",
    "log-sequence-number",
    "leanstore"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-15",
  "citations": [
    {
      "id": "llama-paper",
      "title": "Levandoski, Lomet and Sengupta. LLAMA: A Cache/Storage Subsystem for Modern Hardware. PVLDB 6(10), 2013, pp. 877-888; sections 2-6.",
      "url": "https://www.vldb.org/pvldb/vol6/p877-levandoski.pdf",
      "accessed": "2026-11-15"
    },
    {
      "id": "bw-paper",
      "title": "Levandoski, Lomet and Sengupta. The Bw-Tree: A B-tree for New Hardware Platforms. ICDE 2013; sections II and V.",
      "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/bw-tree-icde2013-final.pdf",
      "accessed": "2026-11-15"
    },
    {
      "id": "publication",
      "title": "Microsoft Research: LLAMA publication record, authors and August 2013 venue.",
      "url": "https://www.microsoft.com/en-us/research/publication/llama-a-cachestorage-subsystem-for-modern-hardware/",
      "accessed": "2026-11-15"
    },
    {
      "id": "hesela-wal",
      "title": "Hesela: WAL, checkpoints and torn pages, with separate recovery guarantees.",
      "url": "https://hesela.com/analyses/wal-checkpoints-torn-pages/",
      "accessed": "2026-11-15"
    }
  ],
  "provenance": [
    "Primary-paper synthesis, not a native LLAMA execution or crash experiment.",
    "The 2013 evaluation compares Bw-tree over LLAMA with BerkeleyDB using specific workloads and hardware; no current-hardware speedup is inferred. [llama-paper]"
  ]
}
