【发布时间】:2017-04-19 19:14:56
【问题描述】:
我在 Windows 中有一个简单的 nodejs 应用程序(应用程序 A),它侦听一个端口,并在收到请求后立即发布到另一台服务器(应用程序 B)并在 MongoDB 中记录响应。
应用 A(单线程,尚未实现集群)每秒处理大约 35 个请求(使用 locust.io 测量)。以下是应用 A 的 profiling 信息。97.8% 的时间由共享库占用,其中 93.5% 是由于 ntdll.dll。这是正常的还是可以修复的潜在瓶颈?
[Summary]:
ticks total nonlib name
6023 2.0% 87.8% JavaScript
0 0.0% 0.0% C++
502 0.2% 7.3% GC
300434 97.8% Shared libraries
834 0.3% Unaccounted
[Shared libraries]:
ticks total nonlib name
287209 93.5% C:\windows\SYSTEM32\ntdll.dll
12907 4.2% C:\Program Files\nodejs\node.exe
144 0.0% C:\windows\system32\KERNELBASE.dll
133 0.0% C:\windows\system32\KERNEL32.DLL
25 0.0% C:\windows\system32\WS2_32.dll
15 0.0% C:\windows\system32\mswsock.dll
1 0.0% C:\windows\SYSTEM32\WINMM.dll
[Bottom up (heavy) profile]:
Note: percentage shows a share of a particular caller in the total
amount of its parent calls.
Callers occupying less than 2.0% are not shown.
[Bottom up (heavy) profile]:
Note: percentage shows a share of a particular caller in the total
amount of its parent calls.
Callers occupying less than 2.0% are not shown.
ticks parent name
287209 93.5% C:\windows\SYSTEM32\ntdll.dll
6705 2.3% C:\Program Files\nodejs\node.exe
831 12.4% LazyCompile: <anonymous> C:\opt\acuity\proxy\nodejs\node_modules\mongoose\node_modules\mongodb-core\lib\topologies\server.js:786:54
826 99.4% LazyCompile: *Callbacks.emit
【问题讨论】:
-
您找到解决方案了吗?如果是的话,请你分享一下。
标签: node.js performance profiling performance-testing v8