Skip to content

[Performance]: Opportunities to speed up BlockPool processing #21141

@Jialin

Description

@Jialin

Proposal to improve performance

Observations

The trace under block_pool.get_new_blocks seems quite fragmented. And we do see some optimization chances there.

Image

Reproduce

export VLLM_USE_MODELSCOPE=False;
export VLLM_TORCH_PROFILER_DIR=~/vllm_profile; # for profiling
vllm serve facebook/opt-125m \
    --swap-space 16 \
    --disable-log-requests \
    --no-enable-prefix-caching \
    --host :: \
    --dtype float16

export VLLM_TORCH_PROFILER_DIR=~/vllm_profile; # for profiling
vllm bench serve \
    --dataset-name random \
    --model facebook/opt-125m \
    --served-model-name facebook/opt-125m \
    --random-input-len 700 \
    --random-output-len 1 \
    --endpoint /v1/completions \
    --ignore-eos \
    --host localhost \
    --port 8000 \
    --request-rate 200 \
    --num-prompts 100 \
    --profile

Report of performance regression

N/A

Misc discussion on performance

N/A

Your current environment (if you think it is necessary)

The output of `python collect_env.py`

N/A

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance-related issuesstaleOver 90 days of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions