diff --git a/checkin_notes b/checkin_notes index f72049d747..9dec05605e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -10726,3 +10726,16 @@ David 16 Aug 2005 client_state.C http_curl.C,h net_xfer_curl.C + +David 16 Aug 2005 + - PROJECT::update_duration_correction_factor(): + small tweak in algorithm + - CLIENT_STATE::scheduler_rpc_poll(): + call compute_work_requests() in all cases + (to avoid asking for work when shouldn't); + increase polling period to 5 sec + (from John McLeod) + + client/ + client_types.C + cs_scheduler.C diff --git a/client/client_types.C b/client/client_types.C index b1796bf1e0..1b85e69f91 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -437,7 +437,8 @@ void PROJECT::update_duration_correction_factor(RESULT* rp) { if (factor < 0.1) { duration_correction_factor = 0.99 * duration_correction_factor + 0.01 * factor; } else { - duration_correction_factor = 0.9 * duration_correction_factor + 0.1 * factor; + double x = 0.9*duration_correction_factor + 0.1*factor; + duration_correction_factor = std::max(factor, x); } } } diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 8c5a8868fc..5e8b43e672 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -619,9 +619,8 @@ bool CLIENT_STATE::scheduler_rpc_poll() { PROJECT *p; bool action=false; static double last_time=0; - static double work_need_inform_time = 0; - if (gstate.now - last_time < 1.0) return false; + if (gstate.now - last_time < 5.0) return false; last_time = gstate.now; switch(scheduler_op->state) { @@ -631,9 +630,8 @@ bool CLIENT_STATE::scheduler_rpc_poll() { break; } - if (should_get_work()) { - compute_work_requests(); - } + compute_work_requests(); + // contact project requested by user // p = next_project_sched_rpc_pending(); @@ -659,22 +657,6 @@ bool CLIENT_STATE::scheduler_rpc_poll() { break; } if (!(exit_when_idle && contacted_sched_server) && overall_work_fetch_urgency != WORK_FETCH_DONT_NEED) { - -#if 0 - if (work_need_inform_time < gstate.now) { - if (overall_work_fetch_urgency == WORK_FETCH_NEED) { - msg_printf(NULL, MSG_INFO, - "May run out of work in %.2f days; requesting more", - global_prefs.work_buf_min_days - ); - } else if (overall_work_fetch_urgency == WORK_FETCH_NEED_IMMEDIATELY) { - msg_printf(NULL, MSG_INFO, - "Insufficient work; requesting more" - ); - } - work_need_inform_time = gstate.now + 3600; - } -#endif scheduler_op->init_get_work(); if (scheduler_op->state != SCHEDULER_OP_STATE_IDLE) { break; diff --git a/doc/boinc_dev.php b/doc/boinc_dev.php index 37777de94d..91ab64ebb2 100644 --- a/doc/boinc_dev.php +++ b/doc/boinc_dev.php @@ -43,9 +43,6 @@ exceeding user preferences, and enforce resource shares, with file deletion according to project policy. -
  • Core client: use select() instead of polling -for I/O (RPCs, file transfers, GUI RPCs). -
  • Use database IDs instead of names to identify results and WUs in the core client (to increase efficiency in the server,