mirror of https://github.com/BOINC/boinc.git
- client, work fetch policy:
adjust project REC by the amount of work queued, to increase variety NOTE: at some point I think I had a reason to not do this, but I can't remember what it is. - client, job scheduling policy: fix how project REC is adjusted svn path=/trunk/boinc/; revision=23838
This commit is contained in:
parent
f44c9910e7
commit
8ca24cbbab
|
@ -4078,3 +4078,19 @@ David 12 July 2011
|
||||||
|
|
||||||
sched/
|
sched/
|
||||||
credit.cpp
|
credit.cpp
|
||||||
|
|
||||||
|
David 13 July 2011
|
||||||
|
- client, work fetch policy:
|
||||||
|
adjust project REC by the amount of work queued, to increase variety
|
||||||
|
NOTE: at some point I think I had a reason to not do this,
|
||||||
|
but I can't remember what it is.
|
||||||
|
- client, job scheduling policy: fix how project REC is adjusted
|
||||||
|
|
||||||
|
client/
|
||||||
|
work_fetch.cpp,h
|
||||||
|
cpu_sched.cpp
|
||||||
|
lib/
|
||||||
|
common_defs.h
|
||||||
|
sched/
|
||||||
|
credit.cpp,h
|
||||||
|
trickle_credit.cpp
|
||||||
|
|
|
@ -539,7 +539,7 @@ static void update_rec() {
|
||||||
for (int j=0; j<coprocs.n_rsc; j++) {
|
for (int j=0; j<coprocs.n_rsc; j++) {
|
||||||
x += p->rsc_pwf[j].secs_this_debt_interval * f * rsc_work_fetch[j].relative_speed;
|
x += p->rsc_pwf[j].secs_this_debt_interval * f * rsc_work_fetch[j].relative_speed;
|
||||||
}
|
}
|
||||||
x /= 1e9;
|
x *= COBBLESTONE_SCALE;
|
||||||
double old = p->pwf.rec;
|
double old = p->pwf.rec;
|
||||||
|
|
||||||
// start averages at zero
|
// start averages at zero
|
||||||
|
@ -619,12 +619,24 @@ double project_priority(PROJECT* p) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we plan to run this job.
|
// called from the scheduler's job-selection loop;
|
||||||
// bump the project's REC accordingly
|
// we plan to run this job;
|
||||||
|
// bump the project's temp REC by the amount credit for 1 scheduling period.
|
||||||
|
// This encourages a mixture jobs from different projects.
|
||||||
//
|
//
|
||||||
void adjust_rec_temp(RESULT* rp) {
|
void adjust_rec_sched(RESULT* rp) {
|
||||||
PROJECT* p = rp->project;
|
PROJECT* p = rp->project;
|
||||||
p->pwf.rec_temp += peak_flops(rp->avp)/86400;
|
double f = peak_flops(rp->avp)*gstate.global_prefs.cpu_scheduling_period();
|
||||||
|
p->pwf.rec_temp += f*COBBLESTONE_SCALE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// called from work fetch initialization;
|
||||||
|
// bump the project's temp REC by the amount of credit
|
||||||
|
// projected for the rest of the job.
|
||||||
|
//
|
||||||
|
void adjust_rec_work_fetch(RESULT* rp) {
|
||||||
|
PROJECT* p = rp->project;
|
||||||
|
p->pwf.rec_temp += rp->estimated_flops_remaining()*COBBLESTONE_SCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust project debts (short, long-term) or REC
|
// adjust project debts (short, long-term) or REC
|
||||||
|
@ -744,7 +756,7 @@ static bool schedule_if_possible(
|
||||||
proc_rsc.schedule(rp, atp);
|
proc_rsc.schedule(rp, atp);
|
||||||
|
|
||||||
if (use_rec) {
|
if (use_rec) {
|
||||||
adjust_rec_temp(rp);
|
adjust_rec_sched(rp);
|
||||||
} else {
|
} else {
|
||||||
// project STD at end of time slice
|
// project STD at end of time slice
|
||||||
//
|
//
|
||||||
|
|
|
@ -898,6 +898,10 @@ PROJECT* WORK_FETCH::choose_project() {
|
||||||
compute_shares();
|
compute_shares();
|
||||||
if (use_rec) {
|
if (use_rec) {
|
||||||
project_priority_init();
|
project_priority_init();
|
||||||
|
for (unsigned int i=0; i<gstate.results.size(); i++) {
|
||||||
|
RESULT* rp = gstate.results[i];
|
||||||
|
adjust_rec_work_fetch(rp);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
set_overall_debts();
|
set_overall_debts();
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,7 +306,8 @@ extern WORK_FETCH work_fetch;
|
||||||
//#ifdef USE_REC
|
//#ifdef USE_REC
|
||||||
void project_priority_init();
|
void project_priority_init();
|
||||||
double project_priority(PROJECT*);
|
double project_priority(PROJECT*);
|
||||||
void adjust_rec_temp(RESULT*);
|
void adjust_rec_sched(RESULT*);
|
||||||
|
void adjust_rec_work_fetch(RESULT*);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
|
|
||||||
#define GUI_RPC_PORT 31416
|
#define GUI_RPC_PORT 31416
|
||||||
|
|
||||||
|
#define COBBLESTONE_SCALE 200/86400e9
|
||||||
|
// multiply normalized PFC by this to get Cobblestones
|
||||||
|
|
||||||
// run modes for CPU, GPU, network,
|
// run modes for CPU, GPU, network,
|
||||||
// controlled by Activity menu and snooze button
|
// controlled by Activity menu and snooze button
|
||||||
//
|
//
|
||||||
|
|
|
@ -35,9 +35,8 @@
|
||||||
|
|
||||||
#include "credit.h"
|
#include "credit.h"
|
||||||
|
|
||||||
// TODO: delete
|
|
||||||
double fpops_to_credit(double fpops) {
|
double fpops_to_credit(double fpops) {
|
||||||
return (fpops/1e9)*COBBLESTONE_FACTOR/SECONDS_PER_DAY;
|
return fpops*COBBLESTONE_SCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
double cpu_time_to_credit(double cpu_time, HOST& host) {
|
double cpu_time_to_credit(double cpu_time, HOST& host) {
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
|
|
||||||
#include "boinc_db.h"
|
#include "boinc_db.h"
|
||||||
|
|
||||||
// Historical note: named after Jeff Cobb
|
|
||||||
//
|
|
||||||
#define COBBLESTONE_FACTOR 100.0
|
|
||||||
|
|
||||||
#define ERROR_RATE_INIT 0.1
|
#define ERROR_RATE_INIT 0.1
|
||||||
// the initial error rate of a host or app version
|
// the initial error rate of a host or app version
|
||||||
|
|
||||||
|
@ -30,8 +26,6 @@
|
||||||
// use host scaling only if have this many samples for host
|
// use host scaling only if have this many samples for host
|
||||||
#define MIN_VERSION_SAMPLES 100
|
#define MIN_VERSION_SAMPLES 100
|
||||||
// update a version's scale only if it has this many samples
|
// update a version's scale only if it has this many samples
|
||||||
#define COBBLESTONE_SCALE 200/86400e9
|
|
||||||
// multiply normalized PFC by this to get Cobblestones
|
|
||||||
|
|
||||||
// parameters for maintaining averages.
|
// parameters for maintaining averages.
|
||||||
// per-host averages respond faster to change
|
// per-host averages respond faster to change
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
//
|
//
|
||||||
// <cpu_time>x</cpu_time>
|
// <cpu_time>x</cpu_time>
|
||||||
//
|
//
|
||||||
// NOTE: there is no cheat-prevention mechanism here.
|
// NOTE: there is no cheat-prevention mechanism here; add your own.
|
||||||
|
// NOTE: doesn't work for GPU apps
|
||||||
|
|
||||||
#include "error_numbers.h"
|
#include "error_numbers.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
Loading…
Reference in New Issue