From 4760e6d9600f5051d92fcaf106a5abd849b9affd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 11 Jul 2007 20:13:53 +0000 Subject: [PATCH] - client simulator: added '--work_fetch_old' option. If set, the simulator uses an approximation of the old work fetch policy, where the client tries to maintain an amount of work for each project equal to the buffer size times its relative resource share svn path=/trunk/boinc/; revision=13144 --- checkin_notes | 13 ++++++++++++- client/sim.C | 3 +++ client/sim.h | 1 + client/work_fetch.C | 32 ++++++++++++++++++++++++++++++++ doc/download.php | 4 ---- doc/sim_form.php | 8 +++++++- 6 files changed, 55 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 761e1a44e9..269ad6a903 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7196,5 +7196,16 @@ Eric K. 11 July 2007 - Web: result display: Changed text for display of results cancelled by server (exit_status=-221). - html/inc/result.inc + html/inc/ + result.inc +David 11 July 2007 + - client simulator: added '--work_fetch_old' option. + If set, the simulator uses an approximation of the old + work fetch policy, where the client tries to maintain + an amount of work for each project equal to + the buffer size times its relative resource share + + client/ + sim.C,h + work_fetch.C diff --git a/client/sim.C b/client/sim.C index 07392532d0..9d013fa327 100644 --- a/client/sim.C +++ b/client/sim.C @@ -59,6 +59,7 @@ bool dcf_dont_use; bool dcf_stats; bool dual_dcf; bool cpu_sched_rr_only; +bool work_fetch_old; SIM_RESULTS sim_results; @@ -601,6 +602,8 @@ int main(int argc, char** argv) { dcf_stats = true; } else if (!strcmp(opt, "--cpu_sched_rr_only")) { cpu_sched_rr_only = true; + } else if (!strcmp(opt, "--work_fetch_old")) { + work_fetch_old = true; } else { help(argv[0]); } diff --git a/client/sim.h b/client/sim.h index 56add2489a..0db7023980 100644 --- a/client/sim.h +++ b/client/sim.h @@ -280,3 +280,4 @@ extern bool dcf_dont_use; extern bool dcf_stats; extern bool cpu_sched_rr_only; extern bool dual_dcf; +extern bool work_fetch_old; diff --git a/client/work_fetch.C b/client/work_fetch.C index 54fef415c0..952c7ebe84 100644 --- a/client/work_fetch.C +++ b/client/work_fetch.C @@ -370,6 +370,38 @@ bool CLIENT_STATE::compute_work_requests() { compute_nuploading_results(); adjust_debts(); +#ifdef SIM + if (work_fetch_old) { + // "dumb" version for simulator only. + // for each project, compute extra work needed to bring it up to + // total_buf/relative resource share. + // + overall_work_fetch_urgency = WORK_FETCH_DONT_NEED; + double trs = total_resource_share(); + double total_buf = ncpus*(work_buf_min() + work_buf_additional()); + for (i=0; iproject != p) continue; + d += rp->estimated_cpu_time_remaining(true); + } + double rrs = p->resource_share/trs; + double minq = total_buf*rrs; + if (d < minq) { + p->work_request = minq-d; + p->work_request_urgency = WORK_FETCH_NEED; + overall_work_fetch_urgency = WORK_FETCH_NEED; + } else { + p->work_request = 0; + p->work_request_urgency = WORK_FETCH_DONT_NEED; + } + } + return false; + } +#endif + rr_simulation(); // compute per-project and overall urgency diff --git a/doc/download.php b/doc/download.php index ee2fb8cdd8..7404e061c6 100755 --- a/doc/download.php +++ b/doc/download.php @@ -46,10 +46,6 @@ function download_link($pname) { for your particular Linux distribution (Gentoo, Fedora, Debian, Ubuntu); check this first before downloading from this page. -

- Note: 5.9.1+ requires GLIBC 2.4 or better to run. This - change was required for the benchmarks to be similar - to the other platforms. "; } } diff --git a/doc/sim_form.php b/doc/sim_form.php index 49bf2c52e5..d4b47a26d9 100644 --- a/doc/sim_form.php +++ b/doc/sim_form.php @@ -110,6 +110,8 @@ function show_form() {

Client uses RR CPU sched?

+ Client uses old work fetch policy? +

DCF: Normal : Stats : Dual @@ -153,6 +155,10 @@ if ($_POST['submit']) { if ($_POST['rr_only']) { $rr_only = '--cpu_sched_rr_only'; } + $work_fetch_old = ''; + if ($_POST['work_fetch_old']) { + $work_fetch_old = '--work_fetch_old'; + } $dcfflag = ""; $dcf = ($_POST['dcf']); @@ -165,7 +171,7 @@ if ($_POST['submit']) { } Header("Location: sim/sim_out.html"); - $cmd = "./sim --duration $duration --delta $delta $suw $dcfflag $rr_only"; + $cmd = "./sim --duration $duration --delta $delta $suw $dcfflag $rr_only $work_fetch_old"; system("/bin/rm sim_log.txt sim_out.html"); system($cmd); } else {