High CPU Usage in shed-worker-po of Tikv When Calling crossbeam_epoch::internal::global::try_advance Function

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tikv中shed-worker-po调用crossbeam_epoch::internal::global::try_advance函数,CPU占用高

| username: TiDBer_mOiapMwy

[TiDB Usage Environment] Testing
[TiDB Version] v6.5.0
[Encountered Issue:] During a sysbench write-only scenario stress test on the database, the shed-worker-po thread usage is close to 100% as observed via top. The flame graph is as follows:

The top two functions are crossbeam_epoch::internal::global::try_advance and crossbeam_epoch::internal::global::collect.
What operations do these functions correspond to? Where is the problem occurring? TT

| username: knull | Original post link

First of all, this crossbeam_epoch is a system library mainly used for lock-free programming, and yatp::queue is a lock-free queue based on this library.

Secondly, the flame graph here shows that the req queue of sched is full and cannot be processed, which is why yatp is so red. So, to see the specific situation, you still need to check what storage is doing.

However, from the information you provided, during the write stress test, this graph basically meets expectations.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.