~ubuntu-branches/ubuntu/lucid/boinc/lucid

« back to all changes in this revision

Viewing changes to doc/credit.php

  • Committer: Bazaar Package Importer
  • Author(s): Frank S. Thomas, Frank S. Thomas
  • Date: 2008-05-31 08:02:47 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080531080247-4ce890lp2rc768cr
Tags: 6.2.7-1
[ Frank S. Thomas ]
* New upstream release.
  - BOINC Manager: Redraw disk usage charts immediately after connecting to
    a (different) client. (closes: 463823)
* debian/copyright:
  - Added the instructions from debian/README.Debian-source about how
    repackaged BOINC tarballs can be reproduced because DevRef now
    recommends to put this here instead of in the afore-mentioned file.
  - Updated for the new release.
* Removed the obsolete debian/README.Debian-source.
* For consistency upstream renamed the core client and the command tool
  ("boinc_client" to "boinc" and "boinc_cmd" to "boinccmd"). Done the same
  in all packages and created symlinks with the old names for the binaries
  and man pages. Also added an entry in debian/boinc-client.NEWS explaining
  this change.
* debian/rules: Do not list Makefile.ins in the clean target individually,
  just remove all that can be found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
require_once("docutil.php");
3
 
page_head("Computation credit");
4
 
echo "
5
 
 
6
 
<p>
7
 
A BOINC project gives you <b>credit</b> for the computations your
8
 
computers perform for it.
9
 
BOINC's unit of credit, the <b>Cobblestone</b> <sup>1</sup>,
10
 
is 1/100 day of CPU time on a reference computer that does both
11
 
<ul>
12
 
<li> 1,000 double-precision MIPS based on the Whetstone benchmark, and
13
 
<li> 1,000 VAX MIPS based on the Dhrystone benchmark.
14
 
</ul>
15
 
These benchmarks are <a href=benchmark.php>imperfect predictors</a>
16
 
of application performance, but they're good enough.
17
 
<p>
18
 
Eventually, credit may reflect network transfer and disk storage as well
19
 
as computation.
20
 
 
21
 
<h2>How credit is determined</h2>
22
 
 
23
 
When your computer completes a result,
24
 
BOINC determines an amount of <b>claimed credit</b>
25
 
in one of two ways:
26
 
<ul>
27
 
<li>
28
 
In general, the claimed credit is the result's CPU time multiplied
29
 
by the CPU benchmarks as measured by the BOINC software.
30
 
<b>NOTE:</b> the BOINC software is not optimized for specific processors.
31
 
Its benchmark numbers may be lower than
32
 
those produced by other programs.
33
 
<li>
34
 
Some applications determine claimed credit themselves,
35
 
and report it to BOINC.
36
 
This would be the case, for example, with
37
 
applications that use graphics coprocessors or other non-CPU hardware.
38
 
</ul>
39
 
 
40
 
<p>
41
 
Claimed credit is reported to a project
42
 
when your computer communicates with its server.
43
 
The <b>granted credit</b> that you receive may
44
 
be different from the claimed credit,
45
 
and there may be a delay of a few hours or days
46
 
before it is granted.
47
 
This is because some BOINC projects grant credit only after
48
 
results have been <a href=intro_user.php#credit>validated</a>.
49
 
 
50
 
 
51
 
 
52
 
<h2>Recent Average Credit</h2>
53
 
<p>
54
 
Projects maintain two counts of granted credit:
55
 
<ul>
56
 
<li> <b>Total credit</b>:
57
 
The total number of Cobblestones performed and granted.
58
 
<li> <b>Recent average credit</b>:
59
 
The average number of Cobblestones per day granted recently.
60
 
This average decreases by a factor of two every week,
61
 
according to the algorithm given below.
62
 
</ul>
63
 
 
64
 
<p>
65
 
Both quantities (total and recent average)
66
 
are maintained for each user, host and team.
67
 
 
68
 
<p>
69
 
Each time new credit is granted,
70
 
the following function is used to update the
71
 
recent average credit of the host, user and team:
72
 
<pre>",htmlspecialchars("
73
 
 
74
 
 
75
 
void update_average(
76
 
    double work_start_time,       // when new work was started
77
 
                                    // (or zero if no new work)
78
 
    double work,                    // amount of new work
79
 
    double half_life,
80
 
    double& avg,                    // average work per day (in and out)
81
 
    double& avg_time                // when average was last computed
82
 
) {
83
 
    double now = dtime();
84
 
 
85
 
    if (avg_time) {
86
 
        // If an average R already exists, imagine that the new work was done
87
 
        // entirely between avg_time and now.
88
 
        // That gives a rate R'.
89
 
        // Replace R with a weighted average of R and R',
90
 
        // weighted so that we get the right half-life if R' == 0.
91
 
        //
92
 
        // But this blows up if avg_time == now; you get 0*(1/0)
93
 
        // So consider the limit as diff->0,
94
 
        // using the first-order Taylor expansion of
95
 
        // exp(x)=1+x+O(x^2).
96
 
        // So to the lowest order in diff:
97
 
        // weight = 1 - diff ln(2) / half_life
98
 
        // so one has
99
 
        // avg += (1-weight)*(work/diff_days)
100
 
        // avg += [diff*ln(2)/half_life] * (work*SECONDS_PER_DAY/diff)
101
 
        // notice that diff cancels out, leaving
102
 
        // avg += [ln(2)/half_life] * work*SECONDS_PER_DAY
103
 
 
104
 
        double diff, diff_days, weight;
105
 
 
106
 
        diff = now - avg_time;
107
 
        if (diff<0) diff=0;
108
 
 
109
 
        diff_days = diff/SECONDS_PER_DAY;
110
 
        weight = exp(-diff*M_LN2/half_life);
111
 
 
112
 
        avg *= weight;
113
 
 
114
 
        if ((1.0-weight) > 1.e-6) {
115
 
            avg += (1-weight)*(work/diff_days);
116
 
        } else {
117
 
            avg += M_LN2*work*SECONDS_PER_DAY/half_life;
118
 
        }
119
 
    } else if (work) {
120
 
        // If first time, average is just work/duration
121
 
        //
122
 
        double dd = (now - work_start_time)/SECONDS_PER_DAY;
123
 
        avg = work/dd;
124
 
    }
125
 
    avg_time = now;
126
 
}
127
 
"),"
128
 
</pre>
129
 
 
130
 
<h3>Computing the current value of Recent Average Credit</h3>
131
 
<p>
132
 
BOINC updates 'recent average credit' (RAC) only when new credit is granted.
133
 
Interfaces that export RAC also export that time at which it was last updated.
134
 
To obtain the current value of RAC,
135
 
you must 'decay' it based on the time that has elapsed
136
 
since it was updated: <pre>", htmlspecialchars('
137
 
function decay_average($avg, $avg_time, $now = 0) {
138
 
   $M_LN2 = 0.693147180559945309417;
139
 
   $credit_half_life = 86400 * 7;
140
 
   if ($now == 0) {
141
 
       $now = time();
142
 
   }
143
 
   $diff = $now - $avg_time;
144
 
   $weight = exp(-$diff * $M_LN2/$credit_half_life);
145
 
   $avg *= $weight;
146
 
   return $avg;
147
 
}
148
 
'), "</pre>
149
 
<p>
150
 
If you don't apply this decay,
151
 
inactive entities will have incorrectly high RAC.
152
 
 
153
 
<p>
154
 
PHP code for the decay function can be found in
155
 
html/inc/credit.inc and html/inc/host.inc.
156
 
 
157
 
<hr noshade size=1>
158
 
<sup>1</sup> Named after Jeff Cobb of SETI@home
159
 
";
160
 
page_tail();
161
 
?>