Disaggregated PD¶
Background¶
LLM online inference services typically need to meet two performance metrics: TTFT and TPOT. Traditional Contiguous Batching scheduling strategies mix Prefill and Decode requests during scheduling, causing Prefill and Decode phases to compete for computational resources. This prevents maximized utilization of computing resources and impacts performance metrics. To resolve this conflict, the Prefill and Decode phases are split to run on independent computational resources, enabling parallel execution. This simultaneously reduces TTFT and TPOT while improving throughput.
Introduction¶
The xLLM PD Separation feature is primarily implemented through the following three modules:
- etcd: Stores metadata such as instance information.
- xLLM Service: Schedules requests and manages all computing instances.
- xLLM: Handles request computation instances.
The overall architecture is shown below: 
Usage¶
Preparation¶
Install Dependencies¶
- xLLM: Refer to Installation && Compilation
- xLLM Service: Refer to PD disaggregation
Obtain Environment Information¶
Deploying Disaggregated PD Service requires obtaining the Device IP of the machine to create communication resources. Execute the command cat /etc/hccn.conf | grep address on the current AI Server to get the Device IP, for example:
address_xx represents the Device IP. Start Disaggregated PD Service¶
- Start etcd
- Start xLLM Service
- Start xLLM
-
Taking Qwen2-7B as an example
- Start Prefill Instance
-
Start Decode Instance
Important notes: -
For PD disaggregation when specifying NPU Device, the corresponding
device_ipis required. This is different for each device. You can see this by executing the following command on the physical machine outside the container environment. The value afteraddress_{i}=displayed is thedevice_ipcorresponding toNPU {i}. -
etcd_addrmust match theetcd_addrofxllm_service
- Start Prefill Instance
Notice¶
Disaggregated PD does not support enabling prefix cache or chunked prefill. These features must be disabled using the following parameters: