Skip to content

pd CPU jitter every 5s  #8674

@tiancaiamao

Description

@tiancaiamao

Bug Report

What did you do?

I create IM empty tables create table t (id int)

What did you expect to see?

CPU usage stable

What did you see instead?

On average, the CPU usage is about 200%+
PD server CPU usage jitter every 5s, between 0~700%

image

Attached is the cpu and heap profile:

pprof.pd-server.samples.cpu.012.pb.gz
pprof.pd-server.alloc_objects.alloc_space.inuse_objects.inuse_space.019.pb.gz

If we can avoid the rand.NewSource call, maybe we can save a lot

image

What version of PD are you using (pd-server -V)?

Release Version: v8.4.0-alpha-1-g2e8f20f
Edition: Community
Git Commit Hash: 2e8f20fef9ce497f9a2d9ed2be3174ecf16fd17e
Git Branch: HEAD
UTC Build Time:  2024-08-21 03:25:28

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.severity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions