{
  "schema_version": "1.0",
  "id": "T-07032d6b5df5",
  "url": "https://gpuatlas.top/articles/T-07032d6b5df5/",
  "title": "llama.cpp 模型放在机械硬盘上，主要影响加载还是出字？",
  "summary": "llama.cpp机械硬盘主要影响何处取决于运行时是否继续读盘，应区分冷加载、文件缓存与换页。",
  "language": "zh-Hans",
  "category": {
    "id": "c-09",
    "name": "框架配置与故障",
    "url": "https://gpuatlas.top/categories/c-09/"
  },
  "topics": [
    {
      "id": "framework-5c58ce0020",
      "name": "llama.cpp",
      "kind": "framework",
      "description": "用 GGUF 在本机运行模型时，GPU layers 和 CPU 卸载怎么分配？先平衡显存占用与生成速度。",
      "url": "https://gpuatlas.top/topics/framework-5c58ce0020/"
    }
  ],
  "body_text": "llama.cpp模型放机械硬盘，先看执行时还需不需要访问磁盘。必要权重已经完整驻留内存或GPU时，磁盘主要影响加载；按需读取、主存不足换页或反复重载时，请求阶段也可能受到影响。\n\n当前加载和内存管理有不同路径，不能仅凭模型文件在硬盘上，就断定每个token都从硬盘读取。先核对文件映射、卸载和实际驻留，再解释磁盘活动与等待。\n\n分别记录首次加载、再次加载和稳定生成。操作系统文件缓存可能让第二次更快，应注明冷暖状态，不只报告最好的那次。若服务经常卸载模型，加载成本会在后续聊天反复出现。\n\n同时观察主存、换页和磁盘读取。物理内存不足时换更快存储可能缓解等待，仍需重新核对驻留预算；降低某个GPU占用也可能把压力转到主存与磁盘。\n\n对照时固定模型和输入输出，将加载、首字与完整完成分列。经常重载的聊天服务，可以先看机械盘读取占掉多少等待；模型已经完整GPU驻留却出字慢，则继续查计算、缓存与请求范围。SSD改善的是哪一段，应由这些记录说明，不能按加载加速比例推算出字也会同倍变快。",
  "published_at": null,
  "modified_at": "2026-11-26T15:17:38.690397+00:00",
  "evidence": {
    "type": "documentation_and_conditional_estimates",
    "hardware_tested": false,
    "note": "资料解释与条件估算，非硬件实测。"
  },
  "sources": [
    {
      "id": "llamacpp-server",
      "url": "https://raw.githubusercontent.com/ggml-org/llama.cpp/master/tools/server/README.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    },
    {
      "id": "llamacpp-multigpu",
      "url": "https://raw.githubusercontent.com/ggml-org/llama.cpp/master/docs/multi-gpu.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    },
    {
      "id": "vllm-troubleshooting",
      "url": "https://raw.githubusercontent.com/vllm-project/vllm/main/docs/usage/troubleshooting.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-07032d6b5df5/",
    "json": "https://gpuatlas.top/data/articles/T-07032d6b5df5.json",
    "markdown": "https://gpuatlas.top/data/articles/T-07032d6b5df5.md"
  }
}
