2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2003-08-15 22:39:56 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2003-08-15 22:39:56 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2002-12-03 18:57:40 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2002-12-03 18:57:40 +00:00
|
|
|
|
2003-09-02 21:16:55 +00:00
|
|
|
#ifndef _SCHED_CONFIG_
|
|
|
|
#define _SCHED_CONFIG_
|
2002-10-04 20:35:56 +00:00
|
|
|
|
2010-06-01 03:45:49 +00:00
|
|
|
#include <regex.h>
|
2008-02-25 18:05:04 +00:00
|
|
|
#include <vector>
|
2009-02-26 00:23:23 +00:00
|
|
|
#include <cstdio>
|
2008-07-21 22:29:10 +00:00
|
|
|
|
2010-06-01 03:45:49 +00:00
|
|
|
#include "sched_limit.h"
|
|
|
|
|
2008-02-25 18:05:04 +00:00
|
|
|
using std::vector;
|
|
|
|
|
2010-04-21 19:33:20 +00:00
|
|
|
// constants related to consecutive_valid.
|
|
|
|
// These could be made configurable.
|
|
|
|
|
|
|
|
#define CONS_VALID_RELIABLE 10
|
|
|
|
// host is eligible to be considered "reliable"
|
|
|
|
#define CONS_VALID_HOST_SCALE 10
|
|
|
|
// host is eligible for host scaling of credit
|
|
|
|
#define CONS_VALID_UNREPLICATED 10
|
|
|
|
// host is eligible for single replication
|
|
|
|
|
2010-06-01 03:45:49 +00:00
|
|
|
// server configuration
|
|
|
|
// MISNAMED - should be SERVER_CONFIG,
|
|
|
|
// and should factor out scheduler-specific stuff into SCHED_CONFIG
|
2002-10-03 18:33:46 +00:00
|
|
|
//
|
2010-06-01 03:45:49 +00:00
|
|
|
struct SCHED_CONFIG {
|
2006-03-07 21:46:49 +00:00
|
|
|
char master_url[256];
|
2004-05-02 15:55:17 +00:00
|
|
|
char long_name[256];
|
2002-10-03 18:33:46 +00:00
|
|
|
char db_name[256];
|
2004-01-15 23:53:13 +00:00
|
|
|
char db_user[256];
|
2002-10-03 18:33:46 +00:00
|
|
|
char db_passwd[256];
|
2003-12-11 19:05:52 +00:00
|
|
|
char db_host[256];
|
2011-01-28 22:03:46 +00:00
|
|
|
char replica_db_name[256];
|
|
|
|
char replica_db_user[256];
|
|
|
|
char replica_db_passwd[256];
|
|
|
|
char replica_db_host[256];
|
2002-10-03 18:33:46 +00:00
|
|
|
int shmem_key;
|
2009-05-07 13:54:51 +00:00
|
|
|
char project_dir[256];
|
2002-10-03 18:33:46 +00:00
|
|
|
char key_dir[256];
|
2002-10-14 23:10:12 +00:00
|
|
|
char download_url[256];
|
2002-12-17 19:00:43 +00:00
|
|
|
char download_dir[256];
|
2002-10-14 23:10:12 +00:00
|
|
|
char upload_url[256];
|
2002-10-03 18:33:46 +00:00
|
|
|
char upload_dir[256];
|
2011-02-23 21:22:45 +00:00
|
|
|
int report_grace_period;
|
2011-02-15 22:07:14 +00:00
|
|
|
// grace period for reporting results;
|
|
|
|
// server's report deadline is client's deadline + this
|
|
|
|
double delete_delay;
|
2004-06-24 21:00:13 +00:00
|
|
|
bool msg_to_host;
|
2004-04-14 23:32:17 +00:00
|
|
|
bool non_cpu_intensive;
|
2006-06-20 17:36:28 +00:00
|
|
|
bool verify_files_on_app_start;
|
2007-06-14 15:05:20 +00:00
|
|
|
int homogeneous_redundancy;
|
2004-06-07 03:34:07 +00:00
|
|
|
bool ignore_upload_certificates;
|
2004-09-24 21:28:12 +00:00
|
|
|
bool dont_generate_upload_certificates;
|
2004-08-05 11:35:09 +00:00
|
|
|
int uldl_dir_fanout; // fanout of ul/dl dirs; 0 if none
|
2005-11-21 18:34:44 +00:00
|
|
|
int uldl_dir_levels;
|
2005-02-02 21:57:11 +00:00
|
|
|
bool cache_md5_info;
|
2005-11-01 04:19:10 +00:00
|
|
|
bool use_benchmark_weights;
|
|
|
|
double fp_benchmark_weight;
|
2006-06-07 04:10:04 +00:00
|
|
|
int fuh_debug_level;
|
- scheduler: add <workload_sim> config option.
If set, the scheduler will use EDF simulation,
together with the in-progress workload reported by the client,
to avoid sending results that
1) will miss their deadline, or
2) will cause an in-progress result to miss its deadline, or
3) will make an in-progress result miss its deadline
by more than is already predicted.
If this option is not set, or if the client request doesn't
include a workload description (i.e. the client is old)
use the existing approach, which assumes there's no workload.
NOTE: this is experimental. Production projects should not use it.
- EDF sim: write debug stuff to stderr instead of stdout
- Account manager:
- if an account is detach_when_done, set dont_request_more_work
- check done_request_more_work even for first-time projects
- update_uotd: generate a file for use by Google gadget
- user_links(): use full URLs (so can use in Google gadget)
client/
acct_mgr.C
work_fetch.C
html/
inc/
uotd.inc
util.inc
user/
uotd_gadget.php (new)
sched/
Makefile.am
edf_sim.C
sched_config.C,h
sched_resend.C
sched_send.C,h
server_types.C,h
svn path=/trunk/boinc/; revision=12639
2007-05-10 21:50:52 +00:00
|
|
|
int reliable_priority_on_over;
|
|
|
|
// additional results generated after at least one result
|
|
|
|
// is over will have their priority boosted by this amount
|
|
|
|
int reliable_priority_on_over_except_error;
|
|
|
|
// additional results generated after at least one result is over
|
2010-03-29 22:28:20 +00:00
|
|
|
// (unless there is an error) will have their priority boosted
|
- scheduler: add <workload_sim> config option.
If set, the scheduler will use EDF simulation,
together with the in-progress workload reported by the client,
to avoid sending results that
1) will miss their deadline, or
2) will cause an in-progress result to miss its deadline, or
3) will make an in-progress result miss its deadline
by more than is already predicted.
If this option is not set, or if the client request doesn't
include a workload description (i.e. the client is old)
use the existing approach, which assumes there's no workload.
NOTE: this is experimental. Production projects should not use it.
- EDF sim: write debug stuff to stderr instead of stdout
- Account manager:
- if an account is detach_when_done, set dont_request_more_work
- check done_request_more_work even for first-time projects
- update_uotd: generate a file for use by Google gadget
- user_links(): use full URLs (so can use in Google gadget)
client/
acct_mgr.C
work_fetch.C
html/
inc/
uotd.inc
util.inc
user/
uotd_gadget.php (new)
sched/
Makefile.am
edf_sim.C
sched_config.C,h
sched_resend.C
sched_send.C,h
server_types.C,h
svn path=/trunk/boinc/; revision=12639
2007-05-10 21:50:52 +00:00
|
|
|
// by this amount
|
|
|
|
int reliable_on_priority;
|
|
|
|
// results with a priority equal or greater than this value
|
|
|
|
// will be sent to reliable hosts
|
2008-03-27 21:39:02 +00:00
|
|
|
bool distinct_beta_apps;
|
|
|
|
// allow users to select beta apps independently
|
2007-05-24 16:07:21 +00:00
|
|
|
bool ended;
|
|
|
|
// Project has ended - tell clients to detach
|
2007-05-29 21:45:01 +00:00
|
|
|
int shmem_work_items;
|
|
|
|
// number of work items in shared memory
|
|
|
|
int feeder_query_size;
|
|
|
|
// number of work items to request in each feeder query
|
2007-06-27 20:09:18 +00:00
|
|
|
char httpd_user[256];
|
|
|
|
// user name under which web server runs (default: apache)
|
2008-02-21 00:47:50 +00:00
|
|
|
bool enable_assignment;
|
2012-02-17 19:16:49 +00:00
|
|
|
bool enable_vda;
|
2012-01-30 22:39:13 +00:00
|
|
|
bool enable_assignment_multi;
|
2010-06-01 03:45:49 +00:00
|
|
|
bool job_size_matching;
|
2010-10-28 19:02:19 +00:00
|
|
|
bool dont_send_jobs;
|
2010-06-01 03:45:49 +00:00
|
|
|
|
|
|
|
//////////// STUFF RELEVANT ONLY TO SCHEDULER FOLLOWS ///////////
|
|
|
|
|
- server code: at some point I made a global var "SCHED_CONFIG config",
mostly so that the parse function could assume
that everything was initially zero.
However, various back-end functions pass around SCHED_CONFIG&
as an argument (also named "config").
This creates a shadow, which is always bad.
Worse is the possibility that some projects have back-end programs
that have a SCHED_CONFIG variable that's automatic,
and therefore isn't zero initially,
and therefore isn't parsing correctly.
To fix this, I changed the 2 vectors in SCHED_CONFIG into pointers,
and have the parse routine zero the structure.
I was tempted to remove the SCHED_CONFIG& args to back-end functions,
but this would have broken some projects' code.
I did, however, change the name from config to config_loc
to avoid shadowing.
Also fixed various other compiler warnings.
svn path=/trunk/boinc/; revision=15541
2008-07-02 17:24:53 +00:00
|
|
|
vector<regex_t> *ban_cpu;
|
2010-06-01 03:45:49 +00:00
|
|
|
vector<regex_t> *ban_os;
|
2012-02-27 12:08:25 +00:00
|
|
|
vector<int> dont_search_host_for_userid;
|
2010-06-01 03:45:49 +00:00
|
|
|
int daily_result_quota; // max results per day is this * mult
|
|
|
|
double default_disk_max_used_gb;
|
|
|
|
double default_disk_max_used_pct;
|
|
|
|
double default_disk_min_free_gb;
|
|
|
|
bool dont_store_success_stderr;
|
|
|
|
int file_deletion_strategy;
|
|
|
|
// select method of automatically deleting files from host
|
|
|
|
int gpu_multiplier; // mult is NCPUS + this*NGPUS
|
|
|
|
bool ignore_delay_bound;
|
|
|
|
bool locality_scheduling;
|
|
|
|
double locality_scheduler_fraction;
|
|
|
|
bool locality_scheduling_sorted_order;
|
|
|
|
int locality_scheduling_wait_period;
|
|
|
|
int locality_scheduling_send_timeout;
|
|
|
|
vector<regex_t> *locality_scheduling_workunit_file;
|
|
|
|
vector<regex_t> *locality_scheduling_sticky_file;
|
2008-05-23 16:13:30 +00:00
|
|
|
bool matchmaker;
|
2011-05-17 21:11:39 +00:00
|
|
|
int max_download_urls_per_file;
|
2010-06-01 03:45:49 +00:00
|
|
|
int max_ncpus;
|
|
|
|
JOB_LIMITS max_jobs_in_progress;
|
|
|
|
int max_wus_to_send; // max results per RPC is this * mult
|
|
|
|
int min_core_client_version;
|
|
|
|
int min_core_client_version_announced;
|
|
|
|
int min_core_client_upgrade_deadline;
|
|
|
|
int min_sendwork_interval;
|
2008-05-23 16:13:30 +00:00
|
|
|
int mm_min_slots;
|
|
|
|
int mm_max_slots;
|
2010-06-01 03:45:49 +00:00
|
|
|
double next_rpc_delay;
|
|
|
|
bool no_amd_k6;
|
|
|
|
// don't allow AMD K6 CPUs
|
2008-10-01 19:48:52 +00:00
|
|
|
bool no_vista_sandbox;
|
2010-06-01 03:45:49 +00:00
|
|
|
bool nowork_skip;
|
|
|
|
bool one_result_per_host_per_wu;
|
|
|
|
bool one_result_per_user_per_wu;
|
|
|
|
int reliable_max_avg_turnaround;
|
|
|
|
// max average turnaround for a host to be declared reliable
|
|
|
|
double reliable_max_error_rate;
|
|
|
|
// DEPRECATED
|
|
|
|
// max error rate for a host to be declared reliable
|
|
|
|
double reliable_reduced_delay_bound;
|
|
|
|
// Reduce the delay bounds for reliable hosts by this percent
|
|
|
|
char replace_download_url_by_timezone[256];
|
2011-05-17 21:11:39 +00:00
|
|
|
bool prefer_primary_platform;
|
|
|
|
// When selecting app versions,
|
|
|
|
// use the client's primary platform if a version exists.
|
|
|
|
// e.g. send 64-bit versions to 64-bit clients,
|
|
|
|
// rather than trying the 32-bit version to see if it's faster.
|
|
|
|
// Do this only if you're sure that your 64-bit versions are
|
|
|
|
// always faster than the corresponding 32-bit versions
|
2012-02-22 19:51:09 +00:00
|
|
|
double version_select_random_factor;
|
|
|
|
// in deciding what version is fastest,
|
|
|
|
// multiply projected FLOPS by a random var with mean 1 and this stddev.
|
2009-05-14 19:01:40 +00:00
|
|
|
int report_max;
|
2010-06-01 03:45:49 +00:00
|
|
|
bool request_time_stats_log;
|
|
|
|
bool resend_lost_results;
|
|
|
|
int sched_debug_level;
|
2012-02-27 12:40:43 +00:00
|
|
|
int scheduler_log_buffer;
|
2010-06-01 03:45:49 +00:00
|
|
|
char sched_lockfile_dir[256];
|
|
|
|
bool send_result_abort;
|
|
|
|
char symstore[256];
|
2011-05-17 21:11:39 +00:00
|
|
|
bool user_filter;
|
|
|
|
// send a job to a user only if wu.batch == user.id
|
2012-02-22 19:51:09 +00:00
|
|
|
// DEPRECATED: use assignment instead
|
2010-06-01 03:45:49 +00:00
|
|
|
bool workload_sim;
|
|
|
|
// Do workload simulation in deciding whether to send a result
|
2008-05-23 16:13:30 +00:00
|
|
|
|
2010-06-01 03:45:49 +00:00
|
|
|
// scheduler log flags
|
2008-03-18 21:22:44 +00:00
|
|
|
//
|
2010-05-13 20:18:27 +00:00
|
|
|
bool debug_array; // debug job-cache scheduling
|
2008-03-18 21:22:44 +00:00
|
|
|
bool debug_assignment;
|
2010-05-13 20:18:27 +00:00
|
|
|
bool debug_credit;
|
|
|
|
bool debug_edf_sim_detail; // show details of EDF sim
|
|
|
|
bool debug_edf_sim_workload; // show workload for EDF sim
|
|
|
|
bool debug_fcgi;
|
|
|
|
bool debug_handle_results;
|
|
|
|
bool debug_locality; // locality scheduling
|
2008-04-23 23:34:26 +00:00
|
|
|
bool debug_prefs;
|
2010-06-25 18:54:37 +00:00
|
|
|
bool debug_quota;
|
2010-05-13 20:18:27 +00:00
|
|
|
bool debug_request_details;
|
2008-05-02 17:48:29 +00:00
|
|
|
bool debug_request_headers;
|
2010-05-13 20:18:27 +00:00
|
|
|
bool debug_resend;
|
|
|
|
bool debug_send;
|
2008-05-02 17:48:29 +00:00
|
|
|
bool debug_user_messages;
|
2012-02-28 06:57:28 +00:00
|
|
|
bool debug_vda;
|
2010-05-13 20:18:27 +00:00
|
|
|
bool debug_version_select;
|
2002-10-03 18:33:46 +00:00
|
|
|
|
2012-02-27 13:12:24 +00:00
|
|
|
char debug_req_reply_dir[256]; // keep sched_request and sched_reply
|
|
|
|
// in files in this directory
|
2006-05-25 05:22:10 +00:00
|
|
|
int parse(FILE*);
|
2010-06-03 04:59:27 +00:00
|
|
|
int parse_aux(FILE*);
|
2009-05-07 13:54:51 +00:00
|
|
|
int parse_file(const char *dir = 0);
|
2007-04-18 20:49:58 +00:00
|
|
|
|
2007-04-19 22:11:25 +00:00
|
|
|
int upload_path(const char*, char*);
|
|
|
|
int download_path(const char*, char*);
|
2009-05-07 13:54:51 +00:00
|
|
|
|
|
|
|
const char *project_path(const char *, ...);
|
2002-10-03 18:33:46 +00:00
|
|
|
};
|
2002-10-04 20:35:56 +00:00
|
|
|
|
2008-02-25 18:05:04 +00:00
|
|
|
extern SCHED_CONFIG config;
|
|
|
|
|
2002-10-04 20:35:56 +00:00
|
|
|
#endif
|