*** empty log message ***

svn path=/trunk/boinc/; revision=11039
This commit is contained in:
David Anderson 2006-08-29 23:15:47 +00:00
parent 886604d12c
commit 240cf6cfff
4 changed files with 47 additions and 17 deletions

View File

@ -9481,3 +9481,15 @@ David 29 Aug 2006
cs_account.C
cs_scheduler.C
scheduler_op.C
David 29 Aug 2006
- lots more debug messages in RR simulator
- fixed small bug in RR sim
(last_active_size => last_project_active_size)
- change meaning of time_debug log flag;
it prints messages related to on_frac etc.
client/
cpu_sched.C
log_flags.h
time_stats.C

View File

@ -773,6 +773,10 @@ bool CLIENT_STATE::rr_simulation() {
vector<RESULT*>::iterator it;
bool rval = false;
if (log_flags.rr_simulation) {
msg_printf(0, MSG_INFO, "rr_sim start: work_buf_min %f rrs %f", work_buf_min(), rrs);
}
// Initialize result lists for each project:
// "active" is what's currently running (in the simulation)
// "pending" is what's queued
@ -811,8 +815,8 @@ bool CLIENT_STATE::rr_simulation() {
double rsf = rrs ? p->resource_share/rrs : 1;
p->cpu_shortfall = work_buf_min() * overall_cpu_frac() * ncpus * rsf;
if (log_flags.rr_simulation) {
msg_printf(NULL, MSG_INFO,
"no results for %s; shortfall %f wbm %f ocf %f rsf %f",
msg_printf(p, MSG_INFO,
"no results; shortfall %f wbm %f ocf %f rsf %f",
p->cpu_shortfall, work_buf_min(), overall_cpu_frac(), rsf
);
}
@ -925,8 +929,14 @@ bool CLIENT_STATE::rr_simulation() {
double rsf = saved_rrs?pbest->resource_share/saved_rrs:1;
double proj_cpu_share = ncpus*rsf;
if (last_active_size < proj_cpu_share) {
if (last_proj_active_size < proj_cpu_share) {
pbest->cpu_shortfall += d_time*(proj_cpu_share - last_proj_active_size);
if (log_flags.rr_simulation) {
msg_printf(pbest, MSG_INFO,
"rr_sim: new shortfall %f d_time %f proj_cpu_share %f lpas %d",
pbest->cpu_shortfall, d_time, proj_cpu_share, last_proj_active_size
);
}
}
if (end_time < buf_end) {
@ -934,12 +944,21 @@ bool CLIENT_STATE::rr_simulation() {
// if this is the last result for this project, account for the tail
if (!pbest->active.size()) {
pbest->cpu_shortfall += d_time * proj_cpu_share;
if (log_flags.rr_simulation) {
msg_printf(pbest, MSG_INFO, "rr_sim proj out of work; shortfall %f d %f pcs %f",
pbest->cpu_shortfall, d_time, proj_cpu_share
);
}
}
}
if (log_flags.rr_simulation) {
msg_printf(0, MSG_INFO,
"rr_simulation loop: idle %d, last active %d, active %d, shortfall %f: proj %s, last active %d, active %d, shortfall %f",
nidle_cpus, last_active_size, (int)active.size(), cpu_shortfall,
"rr_sim total: idle cpus %d, last active %d, active %d, shortfall %f",
nidle_cpus, last_active_size, (int)active.size(), cpu_shortfall
);
msg_printf(0, MSG_INFO,
"rr_sim proj %s: last active %d, active %d, shortfall %f",
pbest->get_project_name(), last_proj_active_size, (int)pbest->active.size(),
pbest->cpu_shortfall
);
@ -957,14 +976,13 @@ bool CLIENT_STATE::rr_simulation() {
for (i=0; i<projects.size(); i++) {
p = projects[i];
if (p->cpu_shortfall) {
msg_printf(NULL, MSG_INFO,
"rr_simulation: shortfall for %s is %f\n",
p->project_name, p->cpu_shortfall
msg_printf(p, MSG_INFO,
"rr_sim: shortfall %f\n", p->cpu_shortfall
);
}
}
msg_printf(NULL, MSG_INFO,
"rr_simulation: end; returning %s; cpu_shortfall %f\n",
"rr_simulation: end; returning %s; total shortfall %f\n",
rval?"true":"false",
cpu_shortfall
);

View File

@ -58,7 +58,7 @@ struct LOG_FLAGS {
bool sched_op_debug;
bool http_debug;
bool proxy_debug;
bool time_debug; // print message on sleep
bool time_debug; // changes in on_frac, active_frac, connected_frac
bool http_xfer_debug;
bool measurement_debug; // host measurement notices
bool poll_debug; // show what polls are responding

View File

@ -43,10 +43,10 @@
#include "time_stats.h"
// exponential decay constant.
// The last 30 days have a weight of 1/e;
// The last 10 days have a weight of 1/e;
// everything before that has a weight of (1-1/e)
const float ALPHA = (SECONDS_PER_DAY*30);
const float ALPHA = (SECONDS_PER_DAY*10);
//const float ALPHA = 60; // for testing
bool BOINC_OUTAGE::is_recent() const {
@ -127,11 +127,11 @@ void TIME_STATS::update(bool is_active) {
}
last_update = gstate.now;
}
#if 0
msg_printf(0, MSG_INFO, "on %f; active %f; conn %f",
on_frac, active_frac, connected_frac
);
#endif
if (log_flags.time_debug) {
msg_printf(0, MSG_INFO, "dt %f w2 %f on %f; active %f; conn %f",
dt, w2, on_frac, active_frac, connected_frac
);
}
}
void TIME_STATS::update_cpu_efficiency(double cpu_wall_time, double cpu_time) {