mirror of https://github.com/BOINC/boinc.git
throttle spewing projects
svn path=/trunk/boinc/; revision=9214
This commit is contained in:
parent
ebe85fca18
commit
adb1dd77b1
|
@ -315,3 +315,16 @@ David 11 Jan 2006
|
|||
|
||||
sched/
|
||||
file_upload_handler.C
|
||||
|
||||
David 11 Jan 2006
|
||||
- Core client: add a flow control mechanism for the case where
|
||||
output files are generated faster than they can be uploaded
|
||||
(otherwise we'll fill up the disk).
|
||||
The mechanism: don't start new results for a project
|
||||
that has > 2 uploads in progress.
|
||||
Note: this actually happens with Cunning Plan
|
||||
(5 MB output files, 60 sec CPU) over a DSL line
|
||||
|
||||
client/
|
||||
client_types.h
|
||||
cs_apps.C
|
||||
|
|
|
@ -274,6 +274,9 @@ public:
|
|||
// project in the current scheduling period (secs)
|
||||
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.
|
||||
|
||||
double work_request;
|
||||
// the unit is "normalized CPU seconds",
|
||||
|
|
|
@ -285,6 +285,10 @@ void CLIENT_STATE::assign_results_to_projects() {
|
|||
project = rp->project;
|
||||
if (project->next_runnable_result) continue;
|
||||
|
||||
// don't start results if > 2 uploads in progress
|
||||
//
|
||||
if (project->nactive_uploads > 2) continue;
|
||||
|
||||
project->next_runnable_result = rp;
|
||||
}
|
||||
|
||||
|
@ -554,10 +558,17 @@ bool CLIENT_STATE::schedule_cpus() {
|
|||
//
|
||||
for (i=0; i<projects.size(); i++) {
|
||||
projects[i]->next_runnable_result = NULL;
|
||||
projects[i]->nactive_uploads = 0;
|
||||
}
|
||||
for (i=0; i<results.size(); i++) {
|
||||
results[i]->already_selected = false;
|
||||
}
|
||||
for (i=0; i<file_xfers->file_xfers.size(); i++) {
|
||||
FILE_XFER* fxp = file_xfers->file_xfers[i];
|
||||
if (fxp->is_upload) {
|
||||
fxp->fip->project->nactive_uploads++;
|
||||
}
|
||||
}
|
||||
|
||||
set_scheduler_modes();
|
||||
adjust_debts();
|
||||
|
|
Loading…
Reference in New Issue