Please sign in to comment.
Code cleanup, EDoc docs, etc.
- Loading branch information...
Showing with 129 additions and 19 deletions.
|@@ -0,0 +1,41 @@|
|+@author Scott Lystig Fritchie <email@example.com>|
|+@copyright 2011 Basho Technologies, Inc.|
|+@title The `riak_sysmon' application|
|+`riak_sysmon' is an Erlang/OTP application that manages the event|
|+messages that can be generated by the Erlang virtual machine's|
|+`system_monitor' BIF (Built-In Function). These messages can notify a|
|+central data-gathering process about the following events:|
|+<li> Processes that have their private heaps grow beyond a certain|
|+<li> Processes whose private heap garbage collection ops take too long </li>|
|+<li> Ports that are busy, e.g., blocking file & socket I/O </li>|
|+<li> Network distribution ports are busy, e.g., lots of communication|
|+ with a slow peer Erlang node. </li>|
|+The problem with `system_monitor' events is that there isn't a|
|+mechanism within the Erlang virtual machine that limits the rate at|
|+which the events are generated. A busy VM can easily create many|
|+hundreds of these messages per second. Some kind of rate-limiting|
|+filter is required to avoid further overloading a system that may|
|+already be overloaded.|
|+This app will use two processes for `system_monitor' message handling.|
|+<li> A `gen_server' process to provide a rate-limiting filter. </li>|
|+<li> A `gen_event' server to allow flexible, user-defined functions to|
|+respond to `system_monitor' events that pass through the first stage|
|+The Erlang/OTP documentation clearly states that only one|
|+process can receive `system_monitor' messages. But using the|
|+`riak_sysmon' OTP app, if multiple parties are interested in receiving|
|+`system_monitor' events, each party can add an event handler to the|
|+`riak_sysmon_handler' event handler.|