mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=6379
This commit is contained in:
parent
1db3db1de2
commit
5e9e62b717
|
@ -8006,3 +8006,20 @@ Charlie 18 June 2005
|
|||
config.h (added)
|
||||
version.h
|
||||
version.h.in
|
||||
|
||||
David 18 June 2005
|
||||
- CLIENT_STATE::set_scheduler_modes():
|
||||
Remove EDF simulation.
|
||||
Instead, simulate weighted round-robin,
|
||||
and if a deadline is missed, use EDF
|
||||
- Remove PROJECT::exp_avg_cpu, PROJECT::exp_avg_mod_time.
|
||||
This was an attempt, introduced a while back but never used,
|
||||
to improve estimates of result CPU time.
|
||||
It's fatally flawed because it assumes all results
|
||||
from a project are the same #FLOPs.
|
||||
It will soon be replaced by a better mechanism.
|
||||
|
||||
client/
|
||||
client_types.C,h
|
||||
cs_apps.C
|
||||
cs_scheduler.C
|
||||
|
|
|
@ -68,8 +68,6 @@ enum SUSPEND_REASON {
|
|||
SUSPEND_REASON_DISK_SIZE = 32
|
||||
};
|
||||
|
||||
#define CPU_HALF_LIFE (86400*7)
|
||||
|
||||
// CLIENT_STATE encapsulates the global variables of the core client.
|
||||
// If you add anything here, initialize it in the constructor
|
||||
//
|
||||
|
|
|
@ -74,8 +74,6 @@ void PROJECT::init() {
|
|||
host_total_credit = 0;
|
||||
host_expavg_credit = 0;
|
||||
host_create_time = 0;
|
||||
exp_avg_cpu = 0;
|
||||
exp_avg_mod_time = 0;
|
||||
nrpc_failures = 0;
|
||||
master_fetch_failures = 0;
|
||||
min_rpc_time = 0;
|
||||
|
@ -147,11 +145,6 @@ int PROJECT::parse_state(MIOFILE& in) {
|
|||
validate_time(user_create_time);
|
||||
continue;
|
||||
}
|
||||
else if (parse_double(buf, "<exp_avg_cpu>", exp_avg_cpu)) continue;
|
||||
else if (parse_double(buf, "<exp_avg_mod_time>", exp_avg_mod_time)) {
|
||||
validate_time(exp_avg_mod_time);
|
||||
continue;
|
||||
}
|
||||
else if (match_tag(buf, "<code_sign_key>")) {
|
||||
retval = copy_element_contents(
|
||||
in,
|
||||
|
@ -218,8 +211,6 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
|||
" <host_total_credit>%f</host_total_credit>\n"
|
||||
" <host_expavg_credit>%f</host_expavg_credit>\n"
|
||||
" <host_create_time>%f</host_create_time>\n"
|
||||
" <exp_avg_cpu>%f</exp_avg_cpu>\n"
|
||||
" <exp_avg_mod_time>%f</exp_avg_mod_time>\n"
|
||||
" <nrpc_failures>%d</nrpc_failures>\n"
|
||||
" <master_fetch_failures>%d</master_fetch_failures>\n"
|
||||
" <min_rpc_time>%f</min_rpc_time>\n"
|
||||
|
@ -245,8 +236,6 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
|||
host_total_credit,
|
||||
host_expavg_credit,
|
||||
host_create_time,
|
||||
exp_avg_cpu,
|
||||
exp_avg_mod_time,
|
||||
nrpc_failures,
|
||||
master_fetch_failures,
|
||||
min_rpc_time,
|
||||
|
@ -310,8 +299,6 @@ void PROJECT::copy_state_fields(PROJECT& p) {
|
|||
host_total_credit = p.host_total_credit;
|
||||
host_expavg_credit = p.host_expavg_credit;
|
||||
host_create_time = p.host_create_time;
|
||||
exp_avg_cpu = p.exp_avg_cpu;
|
||||
exp_avg_mod_time = p.exp_avg_mod_time;
|
||||
nrpc_failures = p.nrpc_failures;
|
||||
master_fetch_failures = p.master_fetch_failures;
|
||||
min_rpc_time = p.min_rpc_time;
|
||||
|
|
|
@ -201,8 +201,6 @@ public:
|
|||
double host_total_credit; // as reported by server
|
||||
double host_expavg_credit; // as reported by server
|
||||
double host_create_time; // as reported by server
|
||||
double exp_avg_cpu; // exponentially weighted CPU time
|
||||
double exp_avg_mod_time; // last time average was changed
|
||||
int nrpc_failures; // # of consecutive times we've failed to
|
||||
// contact all scheduling servers
|
||||
int master_fetch_failures;
|
||||
|
|
|
@ -143,17 +143,7 @@ int CLIENT_STATE::app_finished(ACTIVE_TASK& at) {
|
|||
} else {
|
||||
rp->state = RESULT_FILES_UPLOADING;
|
||||
|
||||
// if success, update average CPU time per result for project
|
||||
//
|
||||
PROJECT* p = rp->project;
|
||||
update_average(
|
||||
gstate.now - rp->final_cpu_time,
|
||||
// KLUDGE - should be result start time
|
||||
rp->final_cpu_time,
|
||||
CPU_HALF_LIFE,
|
||||
p->exp_avg_cpu,
|
||||
p->exp_avg_mod_time
|
||||
);
|
||||
// HANDLE SUCCESS RESULTS HERE
|
||||
}
|
||||
|
||||
double wall_cpu_time = now - cpu_sched_last_time;
|
||||
|
|
|
@ -1005,7 +1005,7 @@ bool CLIENT_STATE::no_work_for_a_cpu() {
|
|||
void CLIENT_STATE::set_scheduler_modes() {
|
||||
std::map<double, RESULT*> results_by_deadline;
|
||||
RESULT* rp;
|
||||
unsigned int i;
|
||||
unsigned int i, j;
|
||||
bool should_not_fetch_work = false;
|
||||
bool use_earliest_deadline_first = false;
|
||||
double frac_booked = 0;
|
||||
|
@ -1016,8 +1016,38 @@ void CLIENT_STATE::set_scheduler_modes() {
|
|||
|
||||
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_SCHED_CPU);
|
||||
|
||||
// simulate weighted round-robin scheduling,
|
||||
// and see if any result misses its deadline
|
||||
//
|
||||
bool round_robin_misses_deadline = false;
|
||||
double rrs = runnable_resource_share();
|
||||
for (i=0; i<projects.size(); i++) {
|
||||
PROJECT* p = projects[i];
|
||||
if (!p->runnable()) continue;
|
||||
double proc_rate = total_proc_rate * (p->resource_share/rrs);
|
||||
double start_time = now;
|
||||
for (j=0; j<results.size(); j++) {
|
||||
rp = results[j];
|
||||
if (rp->project != p) continue;
|
||||
if (!rp->runnable()) continue;
|
||||
start_time += rp->estimated_cpu_time_remaining()/proc_rate;
|
||||
msg_printf(p, MSG_INFO, "result %s: est %f, deadline %f\n",
|
||||
rp->name, start_time, rp->report_deadline
|
||||
);
|
||||
if (start_time > rp->report_deadline) {
|
||||
round_robin_misses_deadline = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (round_robin_misses_deadline) break;
|
||||
}
|
||||
if (round_robin_misses_deadline) {
|
||||
use_earliest_deadline_first = true;
|
||||
if (!no_work_for_a_cpu()) {
|
||||
should_not_fetch_work = true;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<RESULT*>::iterator it_u;
|
||||
for (i=0; i<results.size(); i++) {
|
||||
rp = results[i];
|
||||
if (rp->computing_done()) continue;
|
||||
|
@ -1041,9 +1071,12 @@ void CLIENT_STATE::set_scheduler_modes() {
|
|||
);
|
||||
}
|
||||
|
||||
#if 0
|
||||
results_by_deadline[rp->report_deadline] = rp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
for (i=0; i<ncpus; i++) {
|
||||
booked_to.push_back(gstate.now);
|
||||
}
|
||||
|
@ -1083,6 +1116,7 @@ void CLIENT_STATE::set_scheduler_modes() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// display only when the policy changes to avoid once per second
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue