tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 720 forks source link

mcs: the number of goroutine varies between clusters #6820

Open lhy1024 opened 1 year ago

lhy1024 commented 1 year ago

Bug Report

What did you do?

Run tpcc test

What did you expect to see?

Their goroutine num is similiar

What did you see instead?

The number of goroutine is different between clusters. And it is related with check ops and get clusterinfo ops. Fortunately, it doesn't have much of an effect on memory

  memory goroutine check ops get clusterinfo ops tcms id
cse 1 212MB 548 31 10.3 1817024
cse 2 211MB 562 35 11.7 1818393
cse 3 217MB 602 43 14.3 1818399

e124d45e-4f30-4fb1-9951-4ddfe662a8c8 65a72a90-41ce-4ad1-89ba-52e552601bb5

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

rleungx commented 1 year ago

Why does it belong to a bug? IMO, it's better to provide the concrete goroutine if you think there is something wrong.

lhy1024 commented 1 year ago

Why does it belong to a bug? IMO, it's better to provide the concrete goroutine if you think there is something wrong.

check and getClusterInfo are called periodically by pd-client.

When the ticker's period is determined, and the number of tidb's is determined, their ops shouldn't be too different from one test to the next.