Skip to content

服务使用http2.0后进行压测,接口性能下降 #2502

@libai245

Description

@libai245

我们对后端服务进行了http2.0改造,但是性能出下降情况,而且下降的很大,使用http1.0时TPS为1.8W,使用http2.0时TPS仅为6K
查看性能日志cse_metrics.log后发现在过滤阶段性能差别很大
image

查看线程信息后发现很多线程进入了阻塞状态
image

image

查看截图中方法发现Http2ServerRequestImpl中很多方法都对同一个connection加了锁
image
image

而HttpServerRequestImpl中没有加锁
image
image
问题应该是在过滤阶段,很多过滤器调用了锁方法,导致锁竞争激烈,所以HTTP2.0性能下降了

想问下出现这种问题应该优化

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions