lmcache coordinator#

lmcache coordinator 命令启动 LMCache MP 协调器,这是一个独立的 HTTP 服务,用于跟踪部署中的 MP 服务器实例。MP 服务器向其注册并发送定期心跳;协调器会逐出任何心跳超时的实例,该超时时间由 --instance-timeout 指定。

It is the preferred form of python -m lmcache.v1.mp_coordinator, which still works and accepts the same flags. The process runs in the foreground; stop it with Ctrl-C.

lmcache coordinator [options]

快速开始#

lmcache coordinator \
    --host 0.0.0.0 --port 9300 \
    --instance-timeout 30 \
    --health-check-interval 10

选项#

标志

描述

--host HOST

协调器 HTTP 服务器的绑定地址(默认:0.0.0.0)。

--port PORT

HTTP 端口(默认值:9300)。

--instance-timeout SECS

在没有心跳的情况下,经过多少秒后实例被逐出(默认值:30)。

--health-check-interval SECS

健康检查扫描之间的秒数;0 禁用循环(默认值:10)。

--eviction-check-interval SECS

L2 逐出扫描之间的秒数;0 禁用循环(默认值:5)。

--eviction-ratio RATIO

每个周期逐出的跟踪键的比例(按计数),0.01.0(默认值:0.2)。

--trigger-watermark RATIO

当使用量达到配额的这个比例时会触发逐出,0.0(不包括)到1.0(默认值:1.0)。

--chunk-size N

每个 KV 块的令牌数:CacheBlend 匹配单元以及用于将固定的 token_ids 解析为键的单元。必须等于 MP 服务器的 --chunk-size``(默认值:``256)。

--hash-algorithm NAME

用于固定密钥解析的令牌哈希算法;必须与 MP 服务器的 --hash-algorithm 相等。``blake3``(默认)是自包含的;其他算法需要在协调器中可导入的 vLLM。

--enable-blend-lookup

Index stored chunk content so POST /directory/blend-lookup can serve fleet CacheBlend reuse. Off by default: hashing content costs CPU on every store and is useless without CacheBlend. Also requires the MP servers' --coordinator-event-reporting, which feeds the index.

--blend-probe-stride N

Positions between CacheBlend match probes; 1 probes every offset for full recall (default: 1). Ignored unless blend lookup is on.

--timeout-keep-alive SECS

HTTP服务器在关闭空闲连接之前保持连接打开的秒数。必须大于MP服务器的心跳间隔(默认``5``),否则心跳请求可能会遇到关闭的连接并失败,错误信息为``服务器在未发送响应的情况下断开连接``(默认值:10)。

--disable-metrics

Disable OpenTelemetry metrics. Metrics are enabled by default.

--otlp-endpoint URL

Push metrics to the specified OTLP gRPC endpoint. When unset, Prometheus pull mode exposes /metrics on the coordinator HTTP port.

配置#

Every flag is optional; an unset flag keeps the built-in default listed above.

Prometheus pull mode reuses the coordinator's existing HTTP server; it does not start a second server or reserve a separate Prometheus port. Metrics-disabled and OTLP push modes both return HTTP 404 from the local /metrics route.

See 多服务器协调 for the active eviction loop.

The coordinator drives fleet-wide L2 eviction by calling each MP server's DELETE /l2 endpoint, documented at 缓存对象和预取.

请参阅 多服务器协调 以了解协调器的架构、注册协议和 HTTP API。