Skip to content

[Cherry-Pick][Optimization]Change default workers and max-concurrency when launch api-server(#7457)#7516

Open
EmmonsCurse wants to merge 2 commits intoPaddlePaddle:release/2.6from
EmmonsCurse:cherry-pick/7457/release/2.6
Open

[Cherry-Pick][Optimization]Change default workers and max-concurrency when launch api-server(#7457)#7516
EmmonsCurse wants to merge 2 commits intoPaddlePaddle:release/2.6from
EmmonsCurse:cherry-pick/7457/release/2.6

Conversation

@EmmonsCurse
Copy link
Copy Markdown
Collaborator

Cherry-pick of #7457 (authored by @K11OntheBoat) to release/2.6.

devPR:#7457


Motivation

API-Server 启动服务时,将workers默认从1改为4,服务最大concurrency同步改为2048. 避免了GPU 运行快,但是请求不足的性能瓶颈. Blackwell架构,长输入短输出数据,512并发场景,GLM4.5-Air模型TPS提升1.74倍.
multi_api_server中这两个参数保持不变.

Modifications

API-Server 启动服务时,将workers默认从1改为4,服务最大concurrency同步改为2048.

Checklist

  • Add at least a tag in the PR title.
  • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
  • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 20, 2026

Thanks for your contribution!

PaddlePaddle-bot

This comment was marked as outdated.

Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Code Review | 2026-04-20 22:40:39

📋 Review 摘要

PR 概述:将 API-Server 启动时 workers 默认值从 1 改为 4,max-concurrency 从 512 改为 2048,提升 GPU 利用率;multi_api_server 模式保持原值不变。
变更范围entrypoints/api_server.pyentrypoints/openai/utils.py、CI 配置
影响面 Tag[APIServer] [CI]

问题

未发现阻塞性问题。

总体评价

变更逻辑清晰,通过 FD_ENABLE_MULTI_API_SERVER 环境变量合理区分单服务与多服务模式的默认参数,CI 测试也通过显式传参 --workers 1 进行了适配,避免默认值变更影响已有测试用例。Cherry-pick 内容与原 PR #7457 一致。

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/2.6@f4f7760). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/entrypoints/api_server.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.6    #7516   +/-   ##
==============================================
  Coverage               ?   74.18%           
==============================================
  Files                  ?      376           
  Lines                  ?    52999           
  Branches               ?     8279           
==============================================
  Hits                   ?    39317           
  Misses                 ?    10919           
  Partials               ?     2763           
Flag Coverage Δ
GPU 74.18% <75.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants