Changes between Version 2 and Version 3 of Prefs2
- Timestamp:
- Sep 8, 2019, 5:50:38 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Prefs2
v2 v3 4 4 5 5 "Dynamic" parameters limit BOINC activity 6 and change in response to various factors .6 and change in response to various factors external to BOINC. 7 7 Examples include limits on #CPUs, RAM usage, network usage, etc. 8 8 … … 10 10 11 11 The "prefs dictionary" is a name -> value map, 12 containing values that can affect dynamic p refs.12 containing values that can affect dynamic params. 13 13 Examples: 14 14 … … 20 20 21 21 These values are updated by the client. 22 23 External programs can add items to the dictionary, 22 In addition, external programs can add items to the dictionary, 24 23 and update their values, via GUI RPCs. 25 24 Hence the prefs system is extensible without modifying the client. … … 37 36 * "greater than": the value of the item is greater than a number X. 38 37 * "nonzero": the value of the item is nonzero (i.e. Boolean true) 39 * "time range": the value of the item ( a time value) lies in a set of day/week intervals.38 * "time range": the value of the item (usually "time") lies in a set of day/week intervals. 40 39 41 40 A term can also have a "negate" flag, which if set reverses its sense. … … 45 44 <term> 46 45 <item>item-name</item> 47 <type>x</type> // 0 = greater than, 1 = nonzero, 2 = time range46 <type>x</type> // 0 = greater than, 1 = nonzero, 2 = time range 48 47 [<negate/>] 49 [<thresh>x</thresh>] // if greater than50 [ time range]// if time range48 [<thresh>x</thresh>] // if greater than 49 [<time_range>...</time_range>] // if time range 51 50 </term> 52 51 }}} … … 58 57 [ 59 58 <day> 60 <day_of_week>x</day_of_week> 59 <day_of_week>x</day_of_week> // 0 .. 6 61 60 <start_hour>x</start_hour> 62 61 <end_hour>y</end_hour> … … 76 75 </condition> 77 76 }}} 77 78 If the set if empty, the condition is always true. 78 79 79 80 == Clauses == … … 105 106 If the condition is true, we overwrite X with C's dynamic parameters. 106 107 At the conclusion, X is the dynamic parameters to be enforced by the client. 108 109 == Example == 110 111 The following says to use all the CPUs and 90% of the RAM if 112 there has been no user input in 3 minutes, 113 and to use 50% of the CPUs and 50% of the RAM otherwise: 114 {{{ 115 <computing_prefs> 116 <clause> 117 <condition></condition> 118 <dynamic_params> 119 <max_ncpus_pct>50</max_ncpus_pct> 120 <ram_max_used_frac>.5</ram_max_used_frac> 121 </dynamic_params> 122 </clause> 123 <clause> 124 <condition> 125 <term> 126 <type>gt</type> 127 <item>idle_time</time> 128 <value>180</value> 129 </term> 130 </condition> 131 <dynamic_params> 132 <max_ncpus_pct>100</max_ncpus_pct> 133 <ram_max_used_frac>.9</ram_max_used_frac> 134 </dynamic_params> 135 </clause> 136 </computing_prefs> 137 }}}