mirror of https://github.com/BOINC/boinc.git
- feeder: add -appids option: lets you specify which apps to
get jobs for (default it all). Useful if you're mixing locality and regular scheduling. - a little E@h-specific stuff From Bernd Machenschalk. svn path=/trunk/boinc/; revision=18039
This commit is contained in:
parent
76b8b87e90
commit
6262401394
|
@ -4344,3 +4344,15 @@ David 6 May 2009
|
|||
client/
|
||||
gui_rpc_server_ops.cpp
|
||||
cpu_sched.cpp
|
||||
|
||||
David 6 May 2009
|
||||
- feeder: add -appids option: lets you specify which apps to
|
||||
get jobs for (default it all).
|
||||
Useful if you're mixing locality and regular scheduling.
|
||||
- a little E@h-specific stuff
|
||||
From Bernd Machenschalk.
|
||||
|
||||
sched/
|
||||
feeder.cpp
|
||||
handle_request.cpp
|
||||
sched_send.cpp
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
// recommended if using HR with multiple schedulers
|
||||
// [ -sleep_interval x ] sleep x seconds if nothing to do
|
||||
// [ -allapps ] interleave results from all applications uniformly
|
||||
// [ -appids a1{,a2} ] get work only for appids a1,... (comma-separated list)
|
||||
// [ -purge_stale x ] remove work items from the shared memory segment
|
||||
// that have been there for longer then x minutes
|
||||
// but haven't been assigned
|
||||
|
@ -632,6 +633,7 @@ int main(int argc, char** argv) {
|
|||
int i, retval;
|
||||
void* p;
|
||||
char path[256];
|
||||
char* appids=NULL;
|
||||
|
||||
unlink(REREAD_DB_FILENAME);
|
||||
|
||||
|
@ -660,6 +662,10 @@ int main(int argc, char** argv) {
|
|||
order_clause = "order by r1.priority desc, r1.workunitid";
|
||||
} else if (!strcmp(argv[i], "-purge_stale")) {
|
||||
purge_stale_time = atoi(argv[++i])*60;
|
||||
} else if (!strcmp(argv[i], "-appids")) {
|
||||
strcat(mod_select_clause, " and workunit.appid in (");
|
||||
strcat(mod_select_clause, argv[++i]);
|
||||
strcat(mod_select_clause, ")");
|
||||
} else if (!strcmp(argv[i], "-mod")) {
|
||||
int n = atoi(argv[++i]);
|
||||
int j = atoi(argv[++i]);
|
||||
|
@ -678,11 +684,6 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef EINSTEIN_AT_HOME
|
||||
// don't read locality scheduling workunits into the feeder
|
||||
strcat(mod_select_clause, " and workunit.name not like \"%\\_\\_%\" ");
|
||||
#endif
|
||||
|
||||
log_messages.printf(MSG_NORMAL, "Starting\n");
|
||||
show_version();
|
||||
|
||||
|
|
|
@ -65,6 +65,12 @@ static bool find_host_by_other(DB_USER& user, HOST req_host, DB_HOST& host) {
|
|||
char buf[2048];
|
||||
char dn[512], ip[512], os[512], pm[512];
|
||||
|
||||
#ifdef EINSTEIN_AT_HOME
|
||||
// This is to prevent GRID hosts that manipulate their hostids from flooding E@H's DB with slow queries
|
||||
if ((user.id == 282952) || (user.id == 243543))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// Only check if the fields are populated
|
||||
if (strlen(req_host.domain_name) && strlen(req_host.last_ip_addr) && strlen(req_host.os_name) && strlen(req_host.p_model)) {
|
||||
strcpy(dn, req_host.domain_name);
|
||||
|
@ -77,7 +83,8 @@ static bool find_host_by_other(DB_USER& user, HOST req_host, DB_HOST& host) {
|
|||
escape_string(pm, 512);
|
||||
|
||||
sprintf(buf,
|
||||
"where userid=%d and id>%d and domain_name='%s' and last_ip_addr = '%s' and os_name = '%s' and p_model = '%s' and m_nbytes = %lf order by id desc", user.id, req_host.id, dn, ip, os, pm, req_host.m_nbytes
|
||||
"where userid=%d and id>%d and domain_name='%s' and last_ip_addr = '%s' and os_name = '%s' and p_model = '%s'"
|
||||
" and m_nbytes = %lf order by id desc", user.id, req_host.id, dn, ip, os, pm, req_host.m_nbytes
|
||||
);
|
||||
if (!host.enumerate(buf)) {
|
||||
host.end_enumerate();
|
||||
|
|
|
@ -1461,10 +1461,18 @@ void send_work() {
|
|||
|
||||
if (config.locality_scheduler_fraction > 0) {
|
||||
if (drand() < config.locality_scheduler_fraction) {
|
||||
if (config.debug_locality)
|
||||
log_messages.printf(MSG_NORMAL, "[mixed] sending locality work first\n");
|
||||
send_work_locality();
|
||||
if (config.debug_locality)
|
||||
log_messages.printf(MSG_NORMAL, "[mixed] sending non-locality work second\n");
|
||||
send_work_old();
|
||||
} else {
|
||||
if (config.debug_locality)
|
||||
log_messages.printf(MSG_NORMAL, "[mixed] sending non-locality work first\n");
|
||||
send_work_old();
|
||||
if (config.debug_locality)
|
||||
log_messages.printf(MSG_NORMAL, "[mixed] sending locality work second\n");
|
||||
send_work_locality();
|
||||
}
|
||||
} else if (config.locality_scheduling) {
|
||||
|
|
Loading…
Reference in New Issue