mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3801
This commit is contained in:
parent
62a69c30e5
commit
7879fe53e6
|
@ -14735,4 +14735,18 @@ Daniel 2004-07-06
|
|||
cs_apps.C
|
||||
cs_trickle.C
|
||||
|
||||
Daniel 2004-07-06
|
||||
- client: work requests now include <resource_share_fraction> tag.
|
||||
- scheduler: support for resource_share_fraction
|
||||
when checking for wu feasibility, consider resource share of
|
||||
project to determine estimated wallclock duration
|
||||
- scheduler: syntax bug fix in validator
|
||||
|
||||
client/
|
||||
cs_scheduler.C
|
||||
sched/
|
||||
sched_send.C
|
||||
server_types.C
|
||||
server_types.h
|
||||
validate.C
|
||||
|
||||
|
|
|
@ -283,8 +283,13 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p, double work_req) {
|
|||
FILE_INFO* fip;
|
||||
int retval;
|
||||
double size;
|
||||
double total_share;
|
||||
char cross_project_id[MD5_LEN];
|
||||
|
||||
for (i=0; i<projects.size(); ++i) {
|
||||
total_share += projects[i]->resource_share;
|
||||
}
|
||||
|
||||
if (!f) return ERR_FOPEN;
|
||||
mf.init_file(f);
|
||||
fprintf(f,
|
||||
|
@ -296,13 +301,15 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p, double work_req) {
|
|||
" <core_client_major_version>%d</core_client_major_version>\n"
|
||||
" <core_client_minor_version>%d</core_client_minor_version>\n"
|
||||
" <work_req_seconds>%f</work_req_seconds>\n",
|
||||
" <resource_share_fraction>%f</resource_share_fraction>\n",
|
||||
p->authenticator,
|
||||
p->hostid,
|
||||
p->rpc_seqno,
|
||||
p->anonymous_platform?"anonymous":platform_name,
|
||||
core_client_major_version,
|
||||
core_client_minor_version,
|
||||
work_req
|
||||
work_req,
|
||||
p->resource_share / total_share
|
||||
);
|
||||
if (p->anonymous_platform) {
|
||||
fprintf(f, " <app_versions>\n");
|
||||
|
|
|
@ -140,18 +140,21 @@ inline double estimate_cpu_duration(WORKUNIT& wu, HOST& host) {
|
|||
}
|
||||
|
||||
// estimate the amount of real time for this WU based on active_frac
|
||||
//
|
||||
inline double estimate_wallclock_duration(WORKUNIT& wu, HOST& host) {
|
||||
// and resource_share_fraction
|
||||
inline double estimate_wallclock_duration(
|
||||
WORKUNIT& wu, HOST& host, double resource_share_fraction
|
||||
) {
|
||||
return estimate_cpu_duration(wu, host)
|
||||
/ max(HOST_ACTIVE_FRAC_MIN, host.active_frac)
|
||||
/ max(HOST_ACTIVE_FRAC_MIN, host.active_frac * resource_share_fraction)
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
// return false if the WU can't be executed on the host
|
||||
// because of insufficient memory or CPU speed
|
||||
// because of insufficient memory, CPU speed, or resource share
|
||||
//
|
||||
bool wu_is_feasible(WORKUNIT& wu, HOST& host, WORK_REQ& wreq) {
|
||||
bool wu_is_feasible(
|
||||
WORKUNIT& wu, HOST& host, WORK_REQ& wreq, double resource_share_fraction
|
||||
) {
|
||||
double m_nbytes = host.m_nbytes;
|
||||
if (m_nbytes < MIN_POSSIBLE_RAM) m_nbytes = MIN_POSSIBLE_RAM;
|
||||
|
||||
|
@ -164,7 +167,7 @@ bool wu_is_feasible(WORKUNIT& wu, HOST& host, WORK_REQ& wreq) {
|
|||
return false;
|
||||
}
|
||||
|
||||
double wu_wallclock_time = estimate_wallclock_duration(wu, host);
|
||||
double wu_wallclock_time = estimate_wallclock_duration(wu, host, resource_share_fraction);
|
||||
int host_remaining_time = 0; // TODO
|
||||
|
||||
if (host_remaining_time + wu_wallclock_time > wu.delay_bound) {
|
||||
|
@ -517,7 +520,9 @@ static void scan_work_array(
|
|||
// don't send if host can't handle it
|
||||
//
|
||||
wu = wu_result.workunit;
|
||||
if (!wu_is_feasible(wu, reply.host, wreq)) {
|
||||
if (!wu_is_feasible(wu, reply.host, wreq,
|
||||
sreq.resource_share_fraction)
|
||||
) {
|
||||
log_messages.printf(
|
||||
SCHED_MSG_LOG::DEBUG, "[HOST#%d] [WU#%d %s] WU is infeasible\n",
|
||||
reply.host.id, wu.id, wu.name
|
||||
|
|
|
@ -61,6 +61,7 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
|
|||
strcpy(authenticator, "");
|
||||
hostid = 0;
|
||||
work_req_seconds = 0;
|
||||
resource_share_fraction = 1.0;
|
||||
strcpy(global_prefs_xml, "");
|
||||
strcpy(projects_xml, "");
|
||||
strcpy(code_sign_key, "");
|
||||
|
@ -89,6 +90,7 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
|
|||
else if (parse_int(buf, "<core_client_major_version>", core_client_major_version)) continue;
|
||||
else if (parse_int(buf, "<core_client_minor_version>", core_client_minor_version)) continue;
|
||||
else if (parse_int(buf, "<work_req_seconds>", work_req_seconds)) continue;
|
||||
else if (parse_double(buf, "<resource_share_fraction>", resource_share_fraction)) continue;
|
||||
else if (parse_double(buf, "<project_disk_usage>", project_disk_usage)) continue;
|
||||
else if (parse_double(buf, "<total_disk_usage>", total_disk_usage)) continue;
|
||||
else if (match_tag(buf, "<global_preferences>")) {
|
||||
|
|
|
@ -61,6 +61,7 @@ struct SCHEDULER_REQUEST {
|
|||
int core_client_minor_version;
|
||||
int rpc_seqno;
|
||||
int work_req_seconds;
|
||||
double resource_share_fraction;
|
||||
char global_prefs_xml[LARGE_BLOB_SIZE];
|
||||
char projects_xml[LARGE_BLOB_SIZE];
|
||||
char code_sign_key[4096];
|
||||
|
|
|
@ -357,8 +357,8 @@ mark_validated:
|
|||
log_messages.printf(
|
||||
SCHED_MSG_LOG::CRITICAL,
|
||||
"[WU#%d %s] wu.update() failed: %d; exiting\n", wu.id, wu.name, retval
|
||||
exit(1);
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue