diff --git a/README.md b/README.md index 1f04b52..b6567eb 100644 --- a/README.md +++ b/README.md @@ -39,5 +39,9 @@ DeepSeek Responses API(`/v1/responses`)→ OpenAI Chat Completions 的协议 - 孔明 kaniko 构建(无上下文,从 Gitee clone 源码): `kmctl create image responses-shim --build-mode dockerfile --dockerfile Dockerfile.kaniko --node-group --wait` - 部署清单:`deploy/`(b300 版 + h20 版),`kmctl create cw -f --node-group ` +- **资源建议(2026-10-09 起):4c / 16Gi**。shim 会缓冲完整上游响应体(非流式聚合 + + `STOP_SCOPE=content` 的跨 chunk stop 匹配都要拿全量 content),内存随 + 并发数 × 单响应大小 增长;早期 1c/512Mi 配置在大并发长输出下有 OOM 崩 Pod 风险, + 两套 manifest 已按 4c/16Gi 更新,存量 cw 用 `kmctl update` 生效。 仅标准库,零依赖。源码 source of truth 在本仓库;b300 构建目录 `/data/ymk/build/responses-shim/` 是镜像构建缓存。 diff --git a/deploy/responses-shim-b300-cw.yaml b/deploy/responses-shim-b300-cw.yaml index 09952cb..2f58aa2 100644 --- a/deploy/responses-shim-b300-cw.yaml +++ b/deploy/responses-shim-b300-cw.yaml @@ -41,12 +41,15 @@ spec: ports: - {containerPort: 8080} resources: + # 2026-10-09 用户指令:推荐 4c/16Gi 防崩——shim 会缓冲完整上游响应体 + # (非流式聚合 + STOP_SCOPE=content 的跨 chunk 匹配),内存随 + # 并发数 × 单响应大小增长,1c/512Mi 在大并发长输出下有 OOM 风险 requests: - cpu: 200m - memory: 128Mi - limits: cpu: "1" - memory: 512Mi + memory: 4Gi + limits: + cpu: "4" + memory: 16Gi readinessProbe: httpGet: {path: /healthz, port: 8080} initialDelaySeconds: 2 diff --git a/deploy/responses-shim-h20-cw.yaml b/deploy/responses-shim-h20-cw.yaml index ec72edf..2d6d198 100644 --- a/deploy/responses-shim-h20-cw.yaml +++ b/deploy/responses-shim-h20-cw.yaml @@ -43,12 +43,13 @@ spec: ports: - {containerPort: 8080} resources: + # 2026-10-09 用户指令:推荐 4c/16Gi 防崩(响应体缓冲,OOM 风险,同 b300 版) requests: - cpu: 200m - memory: 128Mi - limits: cpu: "1" - memory: 512Mi + memory: 4Gi + limits: + cpu: "4" + memory: 16Gi readinessProbe: httpGet: {path: /healthz, port: 8080} initialDelaySeconds: 2