diff options
Diffstat (limited to 'lib/stdlib/doc/src/pool.xml')
-rw-r--r-- | lib/stdlib/doc/src/pool.xml | 110 |
1 files changed, 62 insertions, 48 deletions
diff --git a/lib/stdlib/doc/src/pool.xml b/lib/stdlib/doc/src/pool.xml index d217d071da..05d12ade28 100644 --- a/lib/stdlib/doc/src/pool.xml +++ b/lib/stdlib/doc/src/pool.xml @@ -29,89 +29,103 @@ <rev></rev> </header> <module>pool</module> - <modulesummary>Load Distribution Facility</modulesummary> + <modulesummary>Load distribution facility.</modulesummary> <description> - <p><c>pool</c> can be used to run a set of Erlang nodes as a pool + <p>This module can be used to run a set of Erlang nodes as a pool of computational processors. It is organized as a master and a set of slave nodes and includes the following features:</p> + <list type="bulleted"> <item>The slave nodes send regular reports to the master about - their current load.</item> + their current load.</item> <item>Queries can be sent to the master to determine which node - will have the least load.</item> + will have the least load.</item> </list> + <p>The BIF <c>statistics(run_queue)</c> is used for estimating future loads. It returns the length of the queue of ready to run processes in the Erlang runtime system.</p> - <p>The slave nodes are started with the <c>slave</c> module. This - effects, tty IO, file IO, and code loading.</p> - <p>If the master node fails, the entire pool will exit.</p> + + <p>The slave nodes are started with the + <seealso marker="slave"><c>slave(3)</c></seealso> module. This + effects terminal I/O, file I/O, and code loading.</p> + <p>If the master node fails, the entire pool exits.</p> </description> + <funcs> <func> - <name name="start" arity="1"/> - <name name="start" arity="2"/> - <fsummary>>Start a new pool</fsummary> - <desc> - <p>Starts a new pool. The file <c>.hosts.erlang</c> is read to - find host names where the pool nodes can be started. See - section <seealso marker="#files">Files</seealso> below. The - start-up procedure fails if the file is not found.</p> - <p>The slave nodes are started with <c>slave:start/2,3</c>, - passing along <c><anno>Name</anno></c> and, if provided, - <c><anno>Args</anno></c>. - <c><anno>Name</anno></c> is used as the first part of the node names, - <c><anno>Args</anno></c> is used to specify command line arguments. See - <seealso marker="slave#start/2">slave(3)</seealso>.</p> - <p>Access rights must be set so that all nodes in the pool have - the authority to access each other.</p> - <p>The function is synchronous and all the nodes, as well as - all the system servers, are running when it returns a value.</p> - </desc> - </func> - <func> <name name="attach" arity="1"/> - <fsummary>Ensure that a pool master is running</fsummary> + <fsummary>Ensure that a pool master is running.</fsummary> <desc> - <p>This function ensures that a pool master is running and - includes <c><anno>Node</anno></c> in the pool master's pool of nodes.</p> + <p>Ensures that a pool master is running and includes + <c><anno>Node</anno></c> in the pool master's pool of nodes.</p> </desc> </func> + <func> - <name name="stop" arity="0"/> - <fsummary>Stop the pool and kill all the slave nodes</fsummary> + <name name="get_node" arity="0"/> + <fsummary>Return the node with the expected lowest future load.</fsummary> <desc> - <p>Stops the pool and kills all the slave nodes.</p> + <p>Returns the node with the expected lowest future load.</p> </desc> </func> + <func> <name name="get_nodes" arity="0"/> - <fsummary>Return a list of the current member nodes of the pool</fsummary> + <fsummary>Return a list of the current member nodes of the pool. + </fsummary> <desc> <p>Returns a list of the current member nodes of the pool.</p> </desc> </func> + <func> <name name="pspawn" arity="3"/> - <fsummary>Spawn a process on the pool node with expected lowest future load</fsummary> + <fsummary>Spawn a process on the pool node with expected lowest future + load.</fsummary> <desc> - <p>Spawns a process on the pool node which is expected to have + <p>Spawns a process on the pool node that is expected to have the lowest future load.</p> </desc> </func> + <func> <name name="pspawn_link" arity="3"/> - <fsummary>Spawn and link to a process on the pool node with expected lowest future load</fsummary> + <fsummary>Spawn and link to a process on the pool node with expected + lowest future load.</fsummary> <desc> - <p>Spawn links a process on the pool node which is expected to + <p>Spawns and links to a process on the pool node that is expected to have the lowest future load.</p> </desc> </func> + <func> - <name name="get_node" arity="0"/> - <fsummary>Return the node with the expected lowest future load</fsummary> + <name name="start" arity="1"/> + <name name="start" arity="2"/> + <fsummary>>Start a new pool.</fsummary> <desc> - <p>Returns the node with the expected lowest future load.</p> + <p>Starts a new pool. The file <c>.hosts.erlang</c> is read to + find host names where the pool nodes can be started; see + section <seealso marker="#files">Files</seealso>. The + startup procedure fails if the file is not found.</p> + <p>The slave nodes are started with + <seealso marker="slave#start/2"><c>slave:start/2,3</c></seealso>, + passing along <c><anno>Name</anno></c> and, if provided, + <c><anno>Args</anno></c>. <c><anno>Name</anno></c> is used as the + first part of the node names, <c><anno>Args</anno></c> is used to + specify command-line arguments.</p> + <p>Access rights must be set so that all nodes in the pool have + the authority to access each other.</p> + <p>The function is synchronous and all the nodes, and + all the system servers, are running when it returns a value.</p> + </desc> + </func> + + <func> + <name name="stop" arity="0"/> + <fsummary>Stop the pool and kill all the slave nodes.</fsummary> + <desc> + <p>Stops the pool and kills all the slave nodes.</p> </desc> </func> </funcs> @@ -120,12 +134,12 @@ <marker id="files"></marker> <title>Files</title> <p><c>.hosts.erlang</c> is used to pick hosts where nodes can - be started. See - <seealso marker="kernel:net_adm#host_file/0">net_adm(3)</seealso> - for information about format and location of this file.</p> - <p><c>$HOME/.erlang.slave.out.HOST</c> is used for all additional IO - that may come from the slave nodes on standard IO. If the start-up - procedure does not work, this file may indicate the reason.</p> + be started. For information about format and location of this file, see + <seealso marker="kernel:net_adm#host_file/0"> + <c>net_adm:host_file/0</c></seealso>.</p> + <p><c>$HOME/.erlang.slave.out.HOST</c> is used for all extra I/O + that can come from the slave nodes on standard I/O. If the startup + procedure does not work, this file can indicate the reason.</p> </section> </erlref> |