YARP has a higher cpu usage than Nginx
Sorry, I don't know if it is a bug.
Describe the bug
I deployed 3 nginx at HongKong, and deployed 3 YARP at HangZhou.
Client -> Nginx -> Yarp -> Service
Nginx forwards some services, and YARP forward one of them.
Nginx CPU
YARP CPU
YARP other metrics
Htop (Cat.Service.dll is based on YARP)
I tried to analyze the CPU on vs
Top function
Module View
To Reproduce
No exception.
Further technical details
- Include the version of the packages you are using 2.1.0
- The platform (Linux/macOS/Windows) Linux
They're all 4c8g, YARP on ubuntu 22.04, nginx on centos. YARP 2.1.0 runs on .NET 8.
How does the load / RPS compare?
How does the load / RPS compare?
Every YARP is almost 4000
I loaded pdb.
I find that the Thread in WorkerThreadStart method. The Thread.CurrentThread.SetThreadPoolWorkerThreadName() takes up a lot of CPU resources.
I don't know why have to call WorkerThreadStart so many times.
I used YARP source code analysis, I found that YARP itself does not have high cpu usage.
Hi @MihaZupan , any news?
Is it related to the https://github.com/dotnet/runtime/issues/70098 And I see there's pr to fix it