Changes between Version 3 and Version 4 of Prefs2
- Timestamp:
- Sep 9, 2019, 11:51:43 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Prefs2
v3 v4 3 3 == Static and dynamic parameters == 4 4 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. 5 Various parameters control and limit 6 BOINC's use of computing, memory, storage, and network communication. 7 "Static parameters" don't vary over time; 8 for 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.). 11 Dynamic parameters include limits on #CPUs, RAM usage, network throughput, etc. 12 13 This document describes a new system for "computing preferences" in BOINC. 14 This system lets users express, using a set of logical rules, 15 how dynamic parameters change in response 16 to external factors. 17 18 The 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 24 The 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 37 All elements are optional; 38 a parameter set can define some elements but not others. 39 If A and B are parameter sets, the "overlay" of A on B is defined as 40 A together with any elements in B that are not defined in A. 8 41 9 42 == Prefs dictionary == … … 19 52 * "non_boinc_cpu_usage": fraction of CPU used for non-BOINC apps recently 20 53 21 These values are updated by the client.54 These values are updated periodically by the client. 22 55 In addition, external programs can add items to the dictionary, 23 56 and update their values, via GUI RPCs. … … 32 65 33 66 Each term is an assertion about a dictionary item. 34 There are three types of terms:67 There are three types of assertions: 35 68 36 69 * "greater than": the value of the item is greater than a number X. … … 40 73 A term can also have a "negate" flag, which if set reverses its sense. 41 74 42 The XML representation of a term is75 The XML representation of a term: 43 76 {{{ 44 77 <term> 45 78 <item>item-name</item> 46 <type>x</type> // 0 = greater than, 1 = nonzero, 2= time range79 <type>x</type> // 1 = greater than, 2 = nonzero, 3 = time range 47 80 [<negate/>] 48 81 [<thresh>x</thresh>] // if greater than … … 50 83 </term> 51 84 }}} 52 and the representation of a time range is 85 The representation of a time range: 53 86 {{{ 54 87 <time_range> 55 <start _hour>x</start_hour>56 <end _hour>y</end_hour>88 <start>x</start> 89 <end>y</end> 57 90 [ 58 <day >59 <day _of_week>x</day_of_week>// 0 .. 660 <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> 62 95 <day> 63 96 </time_range> … … 76 109 }}} 77 110 78 If the set if empty, the condition is always true.111 The conjunction of an empty set of terms is true. 79 112 80 113 == Clauses == … … 104 137 The clauses are processed in order. 105 138 For each clause C, we evaluate its condition. 106 If the condition is true, we over writeX with C's dynamic parameters.139 If the condition is true, we overlay X with C's dynamic parameters. 107 140 At the conclusion, X is the dynamic parameters to be enforced by the client. 108 141