Changes between Version 3 and Version 4 of Prefs2


Ignore:
Timestamp:
Sep 9, 2019, 11:51:43 AM (5 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Prefs2

    v3 v4  
    33== Static and dynamic parameters ==
    44
    5 "Dynamic" parameters limit BOINC activity
    6 and change in response to various factors external to BOINC.
    7 Examples include limits on #CPUs, RAM usage, network usage, etc.
     5Various parameters control and limit
     6BOINC's use of computing, memory, storage, and network communication.
     7"Static parameters" don't vary over time;
     8for example storage-related parameters are static.
     9"Dynamic" parameters can change in response to factors external to BOINC
     10(such as time of day, non-BOINC CPU usage, etc.).
     11Dynamic parameters include limits on #CPUs, RAM usage, network throughput, etc.
     12
     13This document describes a new system for "computing preferences" in BOINC.
     14This system lets users express, using a set of logical rules,
     15how dynamic parameters change in response
     16to external factors.
     17
     18The goals of this system include:
     19
     20 * Generality: allow the expression of any preferences.
     21 * Extensibility: make it possible to add new external factors
     22   (such as the current cost of electricity) without modifying the client.
     23
     24The XML representations of parameters:
     25{{{
     26<static_params>
     27   [ <disk_max_used_gb>x</disk_max_used_gb> ]
     28   ...
     29</static_params>
     30
     31<dynamic_params>
     32   [ <max_ncpus_pct>x</max_ncpus_pct> ]
     33   ...
     34</dynamic_params>
     35}}}
     36
     37All elements are optional;
     38a parameter set can define some elements but not others.
     39If A and B are parameter sets, the "overlay" of A on B is defined as
     40A together with any elements in B that are not defined in A.
    841
    942== Prefs dictionary ==
     
    1952 * "non_boinc_cpu_usage": fraction of CPU used for non-BOINC apps recently
    2053
    21 These values are updated by the client.
     54These values are updated periodically by the client.
    2255In addition, external programs can add items to the dictionary,
    2356and update their values, via GUI RPCs.
     
    3265
    3366Each term is an assertion about a dictionary item.
    34 There are three types of terms:
     67There are three types of assertions:
    3568
    3669 * "greater than": the value of the item is greater than a number X.
     
    4073A term can also have a "negate" flag, which if set reverses its sense.
    4174
    42 The XML representation of a term is
     75The XML representation of a term:
    4376{{{
    4477<term>
    4578   <item>item-name</item>
    46    <type>x</type>                  // 0 = greater than, 1 = nonzero, 2 = time range
     79   <type>x</type>                  // 1 = greater than, 2 = nonzero, 3 = time range
    4780   [<negate/>]
    4881   [<thresh>x</thresh>]            // if greater than
     
    5083</term>
    5184}}}
    52 and the representation of a time range is
     85The representation of a time range:
    5386{{{
    5487<time_range>
    55    <start_hour>x</start_hour>
    56    <end_hour>y</end_hour>
     88   <start>x</start>
     89   <end>y</end>
    5790   [
    58    <day>
    59       <day_of_week>x</day_of_week>    // 0 .. 6
    60       <start_hour>x</start_hour>
    61       <end_hour>y</end_hour>
     91   <day_of_week>
     92      <day>x</day>                 // 0 .. 6
     93      <start>x</start>
     94      <end>y</end>
    6295   <day>
    6396</time_range>
     
    76109}}}
    77110
    78 If the set if empty, the condition is always true.
     111The conjunction of an empty set of terms is true.
    79112
    80113== Clauses ==
     
    104137The clauses are processed in order.
    105138For each clause C, we evaluate its condition.
    106 If the condition is true, we overwrite X with C's dynamic parameters.
     139If the condition is true, we overlay X with C's dynamic parameters.
    107140At the conclusion, X is the dynamic parameters to be enforced by the client.
    108141