original articles, reproduced please specify the Source: Server non-amateur research http://blog.csdn.net/erlib author Sunface
Contact e-mail: [Email protected]
Processes
Trying to get a global view of processes was helpful when Trying to assess what much work was being done in the VMS in terms O F Tasks. A general good practice in Erlang are to use processes for truly concurrent activities-on Web servers, you'll usually g ET one process per request or connection, and on stateful systems, you may add one process Per-user-and therefore the Nu Mber of processes on a node can is used as a metric for load.
? Most tools mentioned on section 5.1 would track them in one-or another, but if the process count needs to is done Manua Lly, calling the following expression is enough:
? Viewing the number of global processes is very helpful in understanding the work and load of VMS. A good Erlang practice is to derive a process for each concurrent activity-for a Web server, you will often create a process for each request or connection, and, in a stateful system, you may create a process for each user to manage, Therefore, the total number of processes on a node can be used as one of the indicators of the load situation.
Most of the tools mentioned in section 5.1 can track them in a variety of ways, but if you manually get the number of system processes, you just need to use the following function:
--------------------------------------------
1> length(processes()).
56535
-------------------------------------------
? Tracking This value over time can is extremely helpful to try and characterize load or detect process leaks, along with OT Her metrics around.
? Tracking this indicator is very useful for diagnosing system load and detecting process leaks, but can also be diagnosed together with other indicators.
[Erlang crisis] (5.1.3) process