-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU usage is high, located here. #183
Comments
This is epoll sleeping. This doesn't count as CPU usage. Windows uses the wepoll project to implement poll. The underlying implementation uses IOCP.
|
Is it normal for the server CPU usage to be around 30% even without any video streams being loaded?
没负载任何视频流的情况下,服务器CPU占用一直在30左右也是正常吗?
|
Not normal. In theory, wepoll should not cause the CPU to idle.
不正常。 按道理wepoll不会导致cpu空转。
|
zlm enables wepoll by default on Windows. If it's not enabled, it uses the select scheme.
|
Okay, I'll close wepoll first and try again. If there are any problems, I'll come back and give feedback.
好的,我先关闭wepoll试试,后面有问题再来反馈
|
00000018`3200f218 00007ff7`c1a1f33d : 00000018`337b1b90 00000018`337b1b90 00000000`00000000 00000018`00000001 : MediaServer!header_from_block+0xa [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 172]
00000018`3200f220 00007ff7`c1a23595 : 00000018`337b1b90 00000018`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!free_dbg_nolock+0x14d [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 907]
00000018`3200f290 00007ff7`c1937e68 : 00000018`337b1b90 cccccccc`ffffffff cccccccc`cccccccc cccccccc`cccccccc : MediaServer!_free_dbg+0x55 [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 1030]
00000018`3200f2d0 00007ff7`c1934708 : 00000018`337b1b90 cccccccc`cccccccc cccccccc`cccccccc cccccccc`cccccccc : MediaServer!operator delete+0x18 [d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\heap\delete_scalar.cpp @ 38]
00000018`3200f300 00007ff7`c102275c : 00000018`337b1b90 00000000`00000020 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!operator delete+0x18 [d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\heap\delete_scalar_size.cpp @ 32]
00000018`3200f330 00007ff7`c11f976b : 00000018`337b1b90 00000000`00000020 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!std::_Deallocate<16,0>+0x4c [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory @ 221]
00000018`3200f360 00007ff7`c11e5826 : 00000018`3200f538 00000018`337b1b90 00000000`00000001 cccccccc`cccccccc : MediaServer+0x25976b [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory @ 697]
00000018`3200f390 00007ff7`c11e5b00 : 00000018`3200f538 00000018`337b1b90 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x245826 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 312]
00000018`3200f3c0 00007ff7`c11e5580 : 00000018`3200f538 00000018`337b1b90 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x245b00 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 318]
00000018`3200f3f0 00007ff7`c11f95ad : 00000018`3200f538 00000018`2feebb40 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x245580 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 330]
00000018`3200f430 00007ff7`c11ddc8f : 00000018`3200f538 00000018`3200f628 00000018`3200f4f8 00000018`3200f518 : MediaServer+0x2595ad [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 1430]
00000018`3200f470 00007ff7`c11e92c9 : 00000018`3185fee0 cccccccc`cccccc01 cccccccc`cccccc01 cccccccc`cccccccc : MediaServer+0x23dc8f [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 392]
00000018`3200f6b0 00007ff7`c11e60d3 : 00000018`2feeba30 00000018`2feeba28 00000018`2feeba21 00000018`2feeba20 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000018`3200f6e0 00007ff7`c1a41d9c : 00000018`2feeba20 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
00000018`3200f750 00007fff`439e13f2 : 00000018`31857ba0 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000018`3200f7b0 00007fff`463754f4 : 00007fff`439e13d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000018`3200f7e0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34 Closing wepoll still results in high CPU usage. 00000018
|
This is caused by the execution of the timer task. Did you set up a lot of timers?
|
|
Have you done any secondary development?
|
No
没有
|
CPU usage 50% 00000004`28efec78 00007ffc`c94b9823 : 00007ff6`1c401d00 00007ff6`1c44297d 00000004`29c33730 00007ff6`1c3e1601 : ntdll!ZwDeviceIoControlFile+0xa
00000004`28efec80 00007ffc`c94c1656 : 00000000`00000364 00000004`291b4fa0 00000000`00000364 00000004`28efeef4 : mswsock!WSPRecv+0x2ef
00000004`28efed80 00007ffc`cc9544fd : 00000000`00000364 00000004`26f4d270 00000004`299c3790 00000004`28efeef4 : mswsock!WSPRecvFrom+0x5bb
*** WARNING: Unable to verify checksum for MediaServer.exe
00000004`28efee90 00007ff6`1bbd75c8 : 00007ff6`1c401d00 00000004`28849e90 cccccccc`cccccccc cccccccc`00000000 : ws2_32!recvfrom+0xcd
00000004`28efef30 00007ff6`1bbebf16 : 00000004`28890db0 00000004`00000364 cccccccc`00000000 00000004`29dd29f8 : MediaServer+0x2775c8 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 269]
00000004`28eff240 00007ff6`1bbe40b4 : 00000004`29dd29e0 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28bf16 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 247]
00000004`28eff310 00007ff6`1bbdf812 : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!std::invoke<<lambda_5a1320b3a72159d00c193c6ce321b356> &,int>+0x34 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff340 00007ff6`1bbefa0e : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x27f812 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 745]
00000004`28eff370 00007ff6`1bbb185e : 00000004`29dd29d8 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28fa0e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 948]
00000004`28eff3a0 00007ff6`1bbb129c : 00000004`29dd29d8 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25185e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 996]
00000004`28eff3e0 00007ff6`1bba8baf : 00000004`28eff6d8 00000004`2990f490 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25129c [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 386]
00000004`28eff480 00007ff6`1bb9dc82 : 00000004`28eff5e8 00000004`28eff6d8 00000004`28eff5a8 00000004`28eff5c8 : MediaServer+0x248baf [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Util\List.h @ 203]
00000004`28eff520 00007ff6`1bba92c9 : 00000004`28846cb0 cccccccc`cccccc01 cccccccc`cccccc01 cccccccc`cccccccc : MediaServer+0x23dc82 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 391]
00000004`28eff760 00007ff6`1bba60d3 : 00000004`26f49910 00000004`26f49908 00000004`26f49901 00000004`26f49900 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff790 00007ff6`1c401d9c : 00000004`26f49900 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
00000004`28eff800 00007ffc`cc8013f2 : 00000004`28849e90 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000004`28eff860 00007ffc`ccb654f4 : 00007ffc`cc8013d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000004`28eff890 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34
00000004`28efec78 00007ffc`c94b9823 : 00007ff6`1c401d00 00007ff6`1c44297d 00000004`29c33730 00007ff6`1c3e1601 : ntdll!ZwDeviceIoControlFile+0xa
00000004`28efec80 00007ffc`c94c1656 : 00000000`00000364 00000004`291b4fa0 00000000`00000364 00000004`28efeef4 : mswsock!WSPRecv+0x2ef
00000004`28efed80 00007ffc`cc9544fd : 00000000`00000364 00000004`26f4d270 00000004`299c3790 00000004`28efeef4 : mswsock!WSPRecvFrom+0x5bb
*** WARNING: Unable to verify checksum for MediaServer.exe
00000004`28efee90 00007ff6`1bbd75c8 : 00007ff6`1c401d00 00000004`28849e90 cccccccc`cccccccc cccccccc`00000000 : ws2_32!recvfrom+0xcd
00000004`28efef30 00007ff6`1bbebf16 : 00000004`28890db0 00000004`00000364 cccccccc`00000000 00000004`29dd29f8 : MediaServer+0x2775c8 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 269]
00000004`28eff240 00007ff6`1bbe40b4 : 00000004`29dd29e0 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28bf16 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 247]
00000004`28eff310 00007ff6`1bbdf812 : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!std::invoke<<lambda_5a1320b3a72159d00c193c6ce321b356> &,int>+0x34 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff340 00007ff6`1bbefa0e : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x27f812 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 745]
00000004`28eff370 00007ff6`1bbb185e : 00000004`29dd29d8 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28fa0e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 948]
00000004`28eff3a0 00007ff6`1bbb129c : 00000004`29dd29d8 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25185e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 996]
00000004`28eff3e0 00007ff6`1bba8baf : 00000004`28eff6d8 00000004`2990f490 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25129c [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 386]
00000004`28eff480 00007ff6`1bb9dc82 : 00000004`28eff5e8 00000004`28eff6d8 00000004`28eff5a8 00000004`28eff5c8 : MediaServer+0x248baf [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Util\List.h @ 203]
00000004`28eff520 00007ff6`1bba92c9 : 00000004`28846cb0 cccccccc`cccccc01 cccccccc`cccccc01 cccccccc`cccccccc : MediaServer+0x23dc82 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 391]
00000004`28eff760 00007ff6`1bba60d3 : 00000004`26f49910 00000004`26f49908 00000004`26f49901 00000004`26f49900 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff790 00007ff6`1c401d9c : 00000004`26f49900 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
00000004`28eff800 00007ffc`cc8013f2 : 00000004`28849e90 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000004`28eff860 00007ffc`ccb654f4 : 00007ffc`cc8013d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000004`28eff890 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34
`TRANS_BY_GITHUB_AI_ASSISTANT` |
Is there a lot of network data being received?
有大量的网络数据接收?
|
No
没有
|
https://github.com/ZLMediaKit/ZLToolKit/blob/28b7aea107089c17c6f10e8657d27a0815f85b25/src/Poller/EventPoller.cpp#L294C91-L294C91
This thread has been continuously occupying the cpu for more than 4 days
该线程持续占用cpu 4天多
TRANS_BY_GITHUB_AI_ASSISTANT
The text was updated successfully, but these errors were encountered: