mirror of https://github.com/BOINC/boinc.git
- client: compute duration_correction_factor based on elapsed time, not CPU time
(otherwise it doesn't work for coproc or multi-proc apps) - client: in estimate of job completion time, weight the estimate based on fraction done more heavily (quadratic rather than linear) svn path=/trunk/boinc/; revision=16603
This commit is contained in:
parent
122f61996a
commit
89548f04da
|
@ -9775,3 +9775,16 @@ David 2 Dec 2008
|
|||
app.h,cpp
|
||||
app_control.cpp
|
||||
work_fetch.cpp
|
||||
|
||||
David 2 Dec 2008
|
||||
- client: compute duration_correction_factor based on elapsed time, not CPU time
|
||||
(otherwise it doesn't work for coproc or multi-proc apps)
|
||||
- client: in estimate of job completion time,
|
||||
weight the estimate based on fraction done more heavily
|
||||
(quadratic rather than linear)
|
||||
|
||||
client/
|
||||
client_types.h
|
||||
cpu_sched.cpp
|
||||
cs_apps.cpp
|
||||
work_fetch.cpp
|
||||
|
|
|
@ -158,7 +158,7 @@ struct DAILY_STATS {
|
|||
int parse(FILE*);
|
||||
};
|
||||
bool operator < (const DAILY_STATS&, const DAILY_STATS&);
|
||||
|
||||
class ACTIVE_TASK;
|
||||
class PROJECT {
|
||||
public:
|
||||
// the following items come from the account file
|
||||
|
@ -293,7 +293,7 @@ public:
|
|||
/// it goes down slowly but if a new estimate X is larger,
|
||||
/// the factor is set to X.
|
||||
double duration_correction_factor;
|
||||
void update_duration_correction_factor(RESULT*);
|
||||
void update_duration_correction_factor(ACTIVE_TASK*);
|
||||
|
||||
// fields used by CPU scheduler and work fetch
|
||||
// everything from here on applies only to CPU intensive projects
|
||||
|
|
|
@ -1313,7 +1313,8 @@ int ACTIVE_TASK::preempt(bool quit_task) {
|
|||
// Update the correction factor used to predict
|
||||
// completion time for this project's results
|
||||
//
|
||||
void PROJECT::update_duration_correction_factor(RESULT* rp) {
|
||||
void PROJECT::update_duration_correction_factor(ACTIVE_TASK* atp) {
|
||||
RESULT* rp = atp->result;
|
||||
#ifdef SIM
|
||||
if (dcf_dont_use) {
|
||||
duration_correction_factor = 1.0;
|
||||
|
@ -1324,8 +1325,8 @@ void PROJECT::update_duration_correction_factor(RESULT* rp) {
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
double raw_ratio = rp->final_cpu_time/rp->estimated_duration_uncorrected();
|
||||
double adj_ratio = rp->final_cpu_time/rp->estimated_duration(false);
|
||||
double raw_ratio = atp->elapsed_time/rp->estimated_duration_uncorrected();
|
||||
double adj_ratio = atp->elapsed_time/rp->estimated_duration(false);
|
||||
double old_dcf = duration_correction_factor;
|
||||
|
||||
// it's OK to overestimate completion time,
|
||||
|
|
|
@ -199,7 +199,7 @@ int CLIENT_STATE::app_finished(ACTIVE_TASK& at) {
|
|||
rp->set_state(RESULT_FILES_UPLOADING, "CS::app_finished");
|
||||
rp->append_log_record();
|
||||
#endif
|
||||
rp->project->update_duration_correction_factor(rp);
|
||||
rp->project->update_duration_correction_factor(&at);
|
||||
}
|
||||
|
||||
double wall_cpu_time = now - debt_interval_start;
|
||||
|
|
|
@ -801,7 +801,9 @@ double ACTIVE_TASK::est_time_to_completion(bool for_work_fetch) {
|
|||
if (fraction_done <= 0) return wu_est;
|
||||
double frac_est = (elapsed_time / fraction_done) - elapsed_time;
|
||||
double fraction_left = 1-fraction_done;
|
||||
double x = fraction_done*frac_est + fraction_left*fraction_left*wu_est;
|
||||
double wu_weight = fraction_left * fraction_left;
|
||||
double fd_weight = 1 - wu_weight;
|
||||
double x = fd_weight*frac_est + wu_weight*fraction_left*wu_est;
|
||||
return x;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue