diff --git a/checkin_notes b/checkin_notes index 3daf541c41..a1fb80f5e6 100755 --- a/checkin_notes +++ b/checkin_notes @@ -1130,3 +1130,25 @@ David 25 Jan 2007 wxPieCtrl.cpp win_build/ boinc_dll.vcproj + +David 25 Jan 2007 + - core client: there was logic that wouldn't start a result + for a project if it had > 2 active uploads + (intended to prevent an unbounded buildup of files + for a project whose upload server is broken). + This was never triggered since the default is 2 active + transfers per project. + Maybe I meant persistent file transfers. + In any case, this is a bad policy because there may be + a project with lots of output files per result, possibly large, + and there's no reason to keep it from computing. + So instead, I changed it to not start a result from a project + if its number of results in FILES_UPLOADING state exceeds 2*ncpus. + + client/ + client_state.h + client_types.h + cpu_sched.C + cs_scheduler.C + clientgui/ + AdvancedFrame.cpp diff --git a/client/client_state.h b/client/client_state.h index 519f7608f3..f336c625d9 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -307,6 +307,7 @@ public: int input_files_available(RESULT*, bool); ACTIVE_TASK* get_next_graphics_capable_app(); int ncpus; + // number of usable cpus private: int nslots; diff --git a/client/client_types.h b/client/client_types.h index 70f16e4223..37c4f6da66 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -313,9 +313,9 @@ public: // project in the current debt interval struct RESULT *next_runnable_result; // the next result to run for this project - int nactive_uploads; - // number of file uploads in progress. - // Don't start new results if these exceeds 2. + int nuploading_results; + // number of results in UPLOADING state + // Don't start new results if these exceeds 2*ncpus. double work_request; // the unit is "project-normalized CPU seconds", diff --git a/client/cpu_sched.C b/client/cpu_sched.C index 842b0679f2..16ab76cf18 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -137,12 +137,12 @@ void CLIENT_STATE::assign_results_to_projects() { project = rp->project; if (project->next_runnable_result) continue; - // don't start results if project has > 2 uploads in progress. + // don't start results if project has > 2*ncpus uploading results. // This avoids creating an unbounded number of completed // results for a project that can download and compute // faster than it can upload. // - if (project->nactive_uploads > 2) continue; + if (project->nuploading_results > 2*ncpus) continue; project->next_runnable_result = rp; } @@ -439,14 +439,14 @@ void CLIENT_STATE::schedule_cpus() { for (i=0; inext_runnable_result = NULL; - p->nactive_uploads = 0; + p->nuploading_results = 0; p->anticipated_debt = p->short_term_debt; p->deadlines_missed = p->rr_sim_deadlines_missed; } - for (i=0; ifile_xfers.size(); i++) { - FILE_XFER* fxp = file_xfers->file_xfers[i]; - if (fxp->is_upload) { - fxp->fip->project->nactive_uploads++; + for (i=0; istate() == RESULT_FILES_UPLOADING) { + rp->project->nuploading_results++; } } for (i=0; i r->completed_time + work_buf_min()) { return p; } + + // Handle the case where the report is due + // before the next reconnect is likely. + // if (gstate.now > r->report_deadline - work_buf_min()) { - return p; // Handles the case where the report is due before the next reconnect is - // likely. + return p; } } diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index aa78ae55ac..e8d10ac55d 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -448,7 +448,7 @@ bool CAdvancedFrame::CreateMenu() { menuAdvanced->Append( ID_READ_CONFIG, _("Read config file"), - _("Read configuration info from cc-config.xml.") + _("Read configuration info from cc_config.xml.") ); menuAdvanced->Append( ID_READ_PREFS,