Mooncake: Connection refused error when using mooncake store as kvcache store for XpYd disaggregation

Mooncake is a nice work! However, we have the following problem when using the mooncake store as the kvcache store for XpYd disaggregation. Can anyone give some advice? Thanks in advance!

Image

What’s more, Mooncake/mooncake-store/tests/stress_cluster_benchmark.py test case passed and the configuration:

{
    "local_hostname": "X.X.X.X",
    "metadata_server": "etcd://192.168.2.58:2379",
    "protocol": "tcp",
    "device_name": "",
    "master_server_address": "192.168.2.58:50051",
    "global_segment_size": 348966092800
}

About this issue

Most upvoted comments

@zhenwei-intel I think it could be related to concurrent duplicate requests with the same prompt. The hash is computed according to the token_ids, so when one instance hasn’t finished putting a kvcache, another instance want to put a kvcache with the same key will report an error, right? 我认为这可能与具有相同提示的并发重复请求有关。哈希值是根据 token_ids 计算的,所以当一个实例还没放完 kvcache 时,另一个实例想要放同一个 key 的 kvcache 就会报错,对吧?@xiaguan

Yes. More precisely, each object can only be put once; subsequent puts will be skipped (since by design, if the key is the same, the value will be the same), and anobject_already_exist message will be printed.

According to the Mooncake Store doc, there is a TTL feature of get(). If put() skip the duplicate item, for same prompt, MooncakeStore doesn’t ensure decoder can get the same kvcache multiple times. Am I right? How to turn off TTL feature.

object_not_found indicates that the object has never been put, meaning it wasn’t found—this is consistent with the semantics of other databases.

object_already_exists signifies to put the same object multiple times. Strictly speaking, this is not an error; We’ll classify this log as a debug message later.

@Second222None Thx for the logs.

I see some lines in the logs of decode node: INFO 03-30 23:16:17 [metrics.py:481] Avg prompt throughput: 778.8 tokens/s, Avg generation throughput: 29.0 tokens/s, Running: 5 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 1.4%, CPU KV cache usage: 0.0%.

It means that the decode instances failed to receive the kvcache, so they are running the prefill step by themselves, so the Avg prompt throughput is not zero.

If it runs successfully, you should be able to see this debug info: DEBUG 03-31 15:49:48 [mooncake_store_connector.py:202] [rank0]: Successfully received all KVs and hidden states, skip model forwarding. (VllmWorkerProcess pid=1586499) DEBUG 03-31 15:49:48 [mooncake_store_connector.py:202] [rank1]: Successfully received all KVs and hidden states, skip model forwarding.

Also, the TTFT is supposed to be larger than the vanilla vllm without kvcache transfer before we impl layer-wise async transfer. If you want to reduce TTFT, you should increase the prefill node, instead of the decode node. Increase the number of decode instances will show some performance improvement on TPOT and ITL.

Sorry for late reply! The error occured in 1P2D scenario under LLMPerf test. For simplicity, we setup 1P1D( PD instances each run in a docker and mooncake store runs on the same host.) and collect the full log. Please find the attached full log.

decode1-202503302222.log etcd-202503311320.log mooncake_master-202503311320.log prefill-202503302222.log proxy-202503311325.log

We see another error(object_already_exist) and the performance number(TTFT) is not within our expectation. Any suggestion is welcome!

TTFT performance number(ms):

num-concurrent-requests Baseline 1P1D
1 55 442.2
30 141.5 6114.8
60 211.5 12671.7