#26620 Docs: `nproc` in Kubernetes num_workers recommendation returns host CPU count, not pod limit
## Problem
The [production deployment docs](https://docs.litellm.ai/docs/proxy/prod) recommend:
``` CMD ["--port", "4000", "--config", "./proxy_server_config.yaml", "--num_workers", "$(nproc)"] ```
With the claim that it "automatically matches Uvicorn workers to the pod's CPU count."
**This is incorrect on Kubernetes.** `nproc` reports the host node's CPU count, not the pod's cgroup CPU limit or request. For example, on a `e2-standard-16` GKE node with a pod that has `requests.cpu: 4000m` and `limits.cpu: 8000m`:
- `nproc` returns **16** (host node CPUs) - Pod CPU limit is **8** - Pod CPU request (guaranteed) is **4**
Spawning 16 workers on a pod with 4-8 cores causes oversubscription, context switching overhead, and worse latency ā the exact opposite of the stated goal.
## Suggested Fix
Replace the `nproc` recommendation with guidance to either:
1. **Hardcode** `--num_workers` to match the pod's CPU request 2. **Use the Kubernetes Downward API** to inject `requests.cpu` as an env var:
```yaml env: - name: CPU_REQUEST valueFrom: resourceFieldRef: resource: requests.cpu ```
Then: `--num_workers $CPU_REQUEST`
The docs should note that `nproc` is only cā¦