diff --git a/checkin_notes b/checkin_notes index 3da345ff96..ae7903f1f4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -21400,3 +21400,14 @@ David 16 Dec 2004 team_change_founder_action.php (new) team_change_founder_form.php (new) team_manage.php + +David 16 Dec 2004 + - transitioner: if a result times out, update the hosts' + avg_turnaround (charge it with the full delay bound) + - scheduler: print work_req_seconds as a double, not int + + db/ + boinc_db.C,h + sched/ + sched_send.C + transitioner.C diff --git a/sched/sched_send.C b/sched/sched_send.C index 666c7f50c0..c3452e96f8 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -727,7 +727,7 @@ int send_work( log_messages.printf( SCHED_MSG_LOG::NORMAL, - "[HOST#%d] got request for %d seconds of work; available disk %f GB\n", + "[HOST#%d] got request for %f seconds of work; available disk %f GB\n", reply.host.id, sreq.work_req_seconds, wreq.disk_available/1e9 ); diff --git a/sched/transitioner.C b/sched/transitioner.C index 979678d3c6..ed06adfb7d 100644 --- a/sched/transitioner.C +++ b/sched/transitioner.C @@ -62,6 +62,21 @@ int result_suffix(char* name) { return 0; } +// The given result just timed out. +// update the host's avg_turnaround. +// +int penalize_host(int hostid, double delay_bound) { + DB_HOST host; + int retval = host.lookup_id(hostid); + if (retval) return retval; + if (host.avg_turnaround == 0) { + host.avg_turnaround = delay_bound; + } else { + host.avg_turnaround = .7*host.avg_turnaround + .3*delay_bound; + } + return host.update(); +} + int handle_wu( DB_TRANSITIONER_ITEM_SET& transitioner, std::vector& items @@ -121,6 +136,7 @@ int handle_wu( res_item.res_name, retval ); } + penalize_host(res_item.res_hostid, wu_item.delay_bound); nover++; } else { ninprogress++;