{
  "schema_version": "1.0",
  "id": "T-6405f0a8624e",
  "url": "https://gpuatlas.top/articles/T-6405f0a8624e/",
  "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先分开总吞吐和用户体验。离线任务关心整批多久完成，聊天还关心排队、首字与最终答案，不能只报一个tokens/s就判断更好。\n\n上下文状态也会竞争预算，当前版本是否采用统一池、每槽位长度如何解释，需要核对参数和日志，不能照旧教程直接把总长度除以槽位数。请求实际输入和输出范围都应固定。\n\n用同一任务集逐档增加槽位，混合日常短问答与长材料，记录成功率、排队、首字、完整延迟与峰值。只测少量短句无法代表多份文档同时进入，显存尚有余量也不说明计算仍能满足响应目标。\n\n延迟已经超出聊天要求时，就停止增加槽位，回到上一档检查长材料与短问答是否都能完成。个人交互和离线批处理可以各留一套配置：前者保住首字及最终答案等待，后者看整批交付。将版本、缓存与请求比例对应起来，截断或失败从正常完成量里剔除，才能解释“总量变多但每人变慢”的取舍。",
  "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"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-6405f0a8624e/",
    "json": "https://gpuatlas.top/data/articles/T-6405f0a8624e.json",
    "markdown": "https://gpuatlas.top/data/articles/T-6405f0a8624e.md"
  }
}
