{
  "slug": "fastmap",
  "term": "FastMap",
  "aliases": [],
  "definition": "FastMap is a research redesign of the Linux memory-mapped I/O path that reduces synchronization bottlenecks in multicore storage workloads.",
  "note": "The paper reports that stock memory-mapped I/O does not scale beyond 8 threads on a server with 16 physical cores and 32 hardware threads. With lockstat, the page-cache tree_lock showed 126 times more contended acquisitions and 155 times more waiting time than the second most contended lock. [fastmap-paper]\n\nFastMap replaces that shared structure with a per-core radix tree for all pages and a separate per-core red-black tree for dirty pages, so marking a page dirty takes only the dirty-tree lock. Per-mapping page lists replace the coarse read lock used for reverse mappings. [fastmap-paper]\n\nThe released code is a kernel module for 4.14 kernels with a DRAM cache sized in 4 KB pages. It is a prototype evaluation, not a stock Linux feature or a transaction guarantee. [fastmap-code]\n\nThe largest server has 40 physical cores and 80 hardware threads. Section 5.1 attributes the 11.89x read-IOPS result to FastMap plus adapted Speculative Page Faults (SPF), not the unmodified module alone. The prototype without SPF reports 4.7x for reads at 80 threads. [fastmap-paper]\n\nCache sizing: the pinned README mislabels 1024 pages as 4 GB. At 4096 bytes per page, that is 4,194,304 bytes (4 MiB); 4 GiB needs 1,048,576 such pages. The code declares perma_mmap_buf_size as a page count. This arithmetic checks the documented parameter, not total allocated memory or an executed benchmark. [fastmap-code] [fastmap-parameter]",
  "status": "research",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-04",
  "advantages": [
    {
      "text": "With adapted Speculative Page Faults, the authors report about 11.8 times more read IOPS than stock mmap on null_blk at 80 threads.",
      "citationIds": [
        "fastmap-paper"
      ]
    },
    {
      "text": "The module runs without kernel modifications on a 4.14 kernel.",
      "citationIds": [
        "fastmap-code"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Results come from a 4.14 kernel and the authors' hardware, so they do not predict behavior of a current kernel.",
      "citationIds": [
        "fastmap-paper",
        "fastmap-code"
      ]
    },
    {
      "text": "The null_blk figures exclude real device latency, so they bound the software path rather than a deployed system.",
      "citationIds": [
        "fastmap-paper"
      ]
    }
  ],
  "related": [
    "memory-mapped-file",
    "page-cache",
    "msync",
    "direct-io",
    "flashmap",
    "streamcache"
  ],
  "citations": [
    {
      "id": "fastmap-paper",
      "title": "Papagiannis et al., Optimizing Memory-mapped I/O for Fast Storage Devices, USENIX ATC 2020, sections 3-5",
      "url": "https://files.usenix.org/s3fs-public/cdn/atc20-papagiannis.pdf",
      "accessed": "2026-11-11"
    },
    {
      "id": "hesela-fastmap",
      "title": "Hesela: mmap literature and FastMap benchmark scope",
      "url": "https://hesela.com/analyses/mmap-visibility-size-durability/#fastmap-scope",
      "accessed": "2026-10-18"
    },
    {
      "id": "fastmap-code",
      "title": "FastMap source repository README: kernel module build and cache sizing",
      "url": "https://github.com/CARV-ICS-FORTH/FastMap/blob/1af50c165bbb9b4c28971d840b0a3dae1f061f54/README.md",
      "accessed": "2026-11-11"
    },
    {
      "id": "fastmap-parameter",
      "title": "FastMap pinned driver: perma_mmap_buf_size parameter and load-time assignment",
      "url": "https://github.com/CARV-ICS-FORTH/FastMap/blob/1af50c165bbb9b4c28971d840b0a3dae1f061f54/driver/main.c#L74-L76",
      "accessed": "2026-11-11"
    }
  ],
  "provenance": [
    "fastmap-paper is the USENIX ATC 2020 PDF, re-read for the 8-thread and 80-thread scaling figures, the tree_lock contention ratios and the clean and dirty tree design.",
    "fastmap-code is the authors' public repository README, read for the 4.14 kernel-module requirement and the cache size in 4 KB pages.",
    "The page-cache entry links here because FastMap replaces the shared page-cache tree on the mmap path with per-core structures.",
    "2026-11-11: source review distinguishes physical cores from hardware threads, SPF-assisted throughput and the README cache-size arithmetic; no kernel module was run."
  ]
}
