Changeset 5448


Ignore:
Timestamp:
Oct 19, 2010, 2:59:50 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1528: Make slot assignment pluggable in job agents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/appendix/jobagent.properties.xml

    r5446 r5448  
    332332    <para>
    333333      The job agent does not execute an arbitrary number of jobs simultaneously.
    334       This would sooner or later break the server. Instead, it uses a
    335       simple system with four different slots. Each slot is reserved for
    336       jobs that are estimated to be finished in a certain amount of time.
    337       The exception is that a quick job may use a slot with longer expected time
    338       since that will not block the slot very long.
     334      This would sooner or later break the server. A <emphasis>slot manager</emphasis>
     335      is used to assign jobs to a pre-configured number of slots.
    339336    </para>
    340    
     337       
     338    <variablelist>
     339    <varlistentry>
     340      <term><property>agent.slotmanager.class</property></term>
     341      <listitem>
     342        <para>
     343          The name of the Java class that handles slot assignment to
     344          jobs. The standard job agent ships with three different
     345          implementations:
     346         
     347          <itemizedlist>
     348          <listitem>           
     349            <para>
     350            <classname docapi="net.sf.basedb.clients.jobagent.slotmanager">
     351              net.sf.basedb.clients.jobagent.slotmanager.InternalSlotManager
     352            </classname>: This is the default slot manager. It uses a simple system with four different slots.
     353              Each slot is reserved for jobs that are estimated to be finished in a certain amount of time.
     354              The exception is that a quick job may use a slot with longer expected time
     355              since that will not block the slot very long. See the table below for default
     356              settings.
     357            </para>
     358          </listitem>
     359         
     360          <listitem>
     361            <para>
     362            <classname docapi="net.sf.basedb.clients.jobagent.slotmanager">
     363              net.sf.basedb.clients.jobagent.slotmanager.MasterSlotManager
     364            </classname>: This is an extension to the internal slot manager
     365              that also accepts requests for slot assignments from other
     366              job agents. The other job agent(s) should be using the
     367              <classname docapi="net.sf.basedb.clients.jobagent.slotmanager">RemoteSlotManager</classname>.
     368              This makes it possible for a number of job agents to share a
     369              common pool of slots to avoid bottlenecks, for example, at the
     370              database level.
     371            </para>
     372           
     373          </listitem>
     374         
     375          <listitem>
     376            <para>
     377            <classname docapi="net.sf.basedb.clients.jobagent.slotmanager">
     378              net.sf.basedb.clients.jobagent.slotmanager.RemoteSlotManager
     379            </classname>: The remote slot manager connects with another job agent
     380            (running with a
     381            <classname docapi="net.sf.basedb.clients.jobagent.slotmanager">MasterSlotManager</classname>)
     382            and asks it for a slot. When this slot manager is used you need to
     383            specify the ip-address/name and port of the job agent running the
     384            master slot manager.
     385            </para>
     386          </listitem>
     387          </itemizedlist>
     388
     389          It is possible to create your own implementation of a slot manager.
     390          Create a class that implements the
     391          <interfacename docapi="net.sf.basedb.clients.jobagent.slotmanager">net.sf.basedb.clients.jobagent.slotmanager.SlotManager</interfacename>
     392          interface.
     393        </para>
     394      </listitem>
     395    </varlistentry>
     396   
     397    <varlistentry>
     398      <term><property>agent.slotmanager.remote.server</property></term>
     399      <listitem>
     400        <para>
     401          The ip-adress or name of a job agent running as the master slot manager.
     402          This setting is needed by the <classname
     403          docapi="net.sf.basedb.clients.jobagent.slotmanager">RemoteSlotManager</classname>.
     404        </para>
     405      </listitem>
     406    </varlistentry>
     407   
     408    <varlistentry>
     409      <term><property>agent.slotmanager.remote.port</property></term>
     410      <listitem>
     411        <para>
     412          The remote control port number of the job agent running as the
     413          master slot manager. Make sure that the master job agent is accepting connection
     414          from this job agent. This setting is needed by the <classname
     415          docapi="net.sf.basedb.clients.jobagent.slotmanager">RemoteSlotManager</classname>.
     416        </para>
     417      </listitem>
     418    </varlistentry>
     419    </variablelist>
     420
     421
    341422    <para>
    342       A thread priority is associated with each slot. The priority
    343       is a value between 1 and 10 as defined by the
     423      This table lists slot settings for the internal and master
     424      slot managers. The remote slot manager will get slots from
     425      another job agent.
     426      A thread priority is associated with each slot.
     427      The priority is a value between 1 and 10 as defined by the
    344428      <ulink url="http://java.sun.com/javase/6/docs/api/java/lang/Thread.html"
    345         ><classname>java.lang.Thread</classname></ulink> class.
     429        ><classname>java.lang.Thread</classname></ulink> class. The
     430      priorities are not handled by the slot managers, but by the job
     431      agent core and apply to all job agents, no matter which slot manager
     432      that is selected.
    346433    </para>
    347    
    348     <informaltable frame="all" align="center">
    349     <tgroup cols="3">
    350       <colspec colname="property" />
    351       <colspec colname="default" align="center"/>
    352       <colspec colname="time" />
    353       <thead>
    354         <row>
    355           <entry>Property</entry>
    356           <entry>Default value</entry>
    357           <entry>Estimated execution time</entry>
    358         </row>
    359       </thead>
    360434     
    361       <tbody>
    362         <row>
    363           <entry>agent.shortest.slots</entry>
    364           <entry>1</entry>
    365           <entry morerows="1">&lt; 1 minute</entry>
    366         </row>
    367         <row>
    368           <entry>agent.shortest.priority</entry>
    369           <entry>4</entry>
    370         </row>
    371         <row>
    372           <entry>agent.short.slots</entry>
    373           <entry>1</entry>
    374           <entry morerows="1">&lt; 10 minutes</entry>
    375         </row>
    376         <row>
    377           <entry>agent.short.priority</entry>
    378           <entry>4</entry>
    379         </row>
    380         <row>
    381           <entry>agent.medium.slots</entry>
    382           <entry>2</entry>
    383           <entry morerows="1">&lt; 1 hour</entry>
    384         </row>
    385         <row>
    386           <entry>agent.medium.priority</entry>
    387           <entry>3</entry>
    388         </row>
    389         <row>
    390           <entry>agent.long.slots</entry>
    391           <entry>2</entry>
    392           <entry morerows="1">&gt; 1 hour</entry>
    393         </row>
    394         <row>
    395           <entry>agent.long.priority</entry>
    396           <entry>3</entry>
    397         </row>
    398       </tbody>
    399     </tgroup>
    400     </informaltable>
    401    
     435      <informaltable frame="all" align="center">
     436      <tgroup cols="3">
     437        <colspec colname="property" />
     438        <colspec colname="default" align="center"/>
     439        <colspec colname="time" />
     440        <thead>
     441          <row>
     442            <entry>Property</entry>
     443            <entry>Default value</entry>
     444            <entry>Estimated execution time</entry>
     445          </row>
     446        </thead>
     447       
     448        <tbody>
     449          <row>
     450            <entry>agent.shortest.slots</entry>
     451            <entry>1</entry>
     452            <entry morerows="1">&lt; 1 minute</entry>
     453          </row>
     454          <row>
     455            <entry>agent.shortest.priority</entry>
     456            <entry>4</entry>
     457          </row>
     458          <row>
     459            <entry>agent.short.slots</entry>
     460            <entry>1</entry>
     461            <entry morerows="1">&lt; 10 minutes</entry>
     462          </row>
     463          <row>
     464            <entry>agent.short.priority</entry>
     465            <entry>4</entry>
     466          </row>
     467          <row>
     468            <entry>agent.medium.slots</entry>
     469            <entry>2</entry>
     470            <entry morerows="1">&lt; 1 hour</entry>
     471          </row>
     472          <row>
     473            <entry>agent.medium.priority</entry>
     474            <entry>3</entry>
     475          </row>
     476          <row>
     477            <entry>agent.long.slots</entry>
     478            <entry>2</entry>
     479            <entry morerows="1">&gt; 1 hour</entry>
     480          </row>
     481          <row>
     482            <entry>agent.long.priority</entry>
     483            <entry>3</entry>
     484          </row>
     485        </tbody>
     486      </tgroup>
     487      </informaltable>
    402488
    403489  </simplesect>
Note: See TracChangeset for help on using the changeset viewer.