IntroductionCharacterizing the scalability of Erlang.VMOn kernel-core processorsExplanation:
Erlang schedulers are based on execution ction counting as a method for measuring execution time. A function is roughly equivalent to a function call. since each function call may take a different amount of time, the actual periods are not the same between different functions. when a process is scheduled to run, it is assigned a number of functions that it is allowed to execute (by default 2000 wrong CT Ions in r13b04 ). the process can execute until it consumes all its operation ction quantum or pauses to wait for a message. A process waiting for a message is rescheduled when a new message comes or a timer expires. rescheduled or new processes are put to the end of corresponding run queues. sushortded (BLOCKED) processes are not stored in the run queues .!
However, the above "a function is roughly equivalent to a function call." is still unclear. I have consulted the Overlord:
Q: The trap mechanism of Erlang ensures fair scheduling. I have a question: Is the function call complete? For example, when a time-consuming operation is executed, will it change if the CPU time slice is sent and then scheduled to execute mongociton again?
A:-Overlord's reply:
Fair Scheduling involves three parts:
- Erlang function call. Since Erlang code is translated into opcode and executed by a virtual machine, a complete function call is called as a function. erlang functions are usually recursively executed, so the function body is generally small.
- BIF trap mechanism. To put it simply, BIF will execute a few time slices such as limit ction and then discard the execution, record the current execution status, and then exit. When the next scheduling is executed, the previous position will continue.
- Io scheduling. I/O is also a fair schedule. I/O processing capacity is converted into operation, which is included in the time slice of the host process.
For more information, see:
Design of trap mechanism of Erlang ERTs and Its Application http://mryufeng.iteye.com/blog/334744
At last, I figured out that the software had stopped service: