PageRenderTime 23ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/src/boinc-7.0.36/sched/sched_config.h

https://github.com/matszpk/native-boinc-for-android
C Header | 209 lines | 134 code | 15 blank | 60 comment | 0 complexity | 59b2a86511fe31e3e86812e6c1b42aa4 MD5 | raw file
  1. // This file is part of BOINC.
  2. // http://boinc.berkeley.edu
  3. // Copyright (C) 2008 University of California
  4. //
  5. // BOINC is free software; you can redistribute it and/or modify it
  6. // under the terms of the GNU Lesser General Public License
  7. // as published by the Free Software Foundation,
  8. // either version 3 of the License, or (at your option) any later version.
  9. //
  10. // BOINC is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. // See the GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with BOINC. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef _SCHED_CONFIG_
  18. #define _SCHED_CONFIG_
  19. #include <regex.h>
  20. #include <vector>
  21. #include <cstdio>
  22. #include "sched_limit.h"
  23. using std::vector;
  24. // constants related to consecutive_valid.
  25. // These could be made configurable.
  26. #define CONS_VALID_RELIABLE 10
  27. // host is eligible to be considered "reliable"
  28. #define CONS_VALID_HOST_SCALE 10
  29. // host is eligible for host scaling of credit
  30. #define CONS_VALID_UNREPLICATED 10
  31. // host is eligible for single replication
  32. // server configuration
  33. // MISNAMED - should be SERVER_CONFIG,
  34. // and should factor out scheduler-specific stuff into SCHED_CONFIG
  35. //
  36. struct SCHED_CONFIG {
  37. char master_url[256];
  38. char long_name[256];
  39. char db_name[256];
  40. char db_user[256];
  41. char db_passwd[256];
  42. char db_host[256];
  43. char replica_db_name[256];
  44. char replica_db_user[256];
  45. char replica_db_passwd[256];
  46. char replica_db_host[256];
  47. int shmem_key;
  48. char project_dir[256];
  49. char key_dir[256];
  50. char download_url[256];
  51. char download_dir[256];
  52. char upload_url[256];
  53. char upload_dir[256];
  54. int report_grace_period;
  55. // grace period for reporting results;
  56. // server's report deadline is client's deadline + this
  57. double delete_delay;
  58. bool msg_to_host;
  59. bool non_cpu_intensive;
  60. bool verify_files_on_app_start;
  61. int homogeneous_redundancy;
  62. bool hr_allocate_slots;
  63. bool ignore_upload_certificates;
  64. bool dont_generate_upload_certificates;
  65. int uldl_dir_fanout; // fanout of ul/dl dirs; 0 if none
  66. int uldl_dir_levels;
  67. bool cache_md5_info;
  68. bool use_benchmark_weights;
  69. double fp_benchmark_weight;
  70. int fuh_debug_level;
  71. int reliable_priority_on_over;
  72. // additional results generated after at least one result
  73. // is over will have their priority boosted by this amount
  74. int reliable_priority_on_over_except_error;
  75. // additional results generated after at least one result is over
  76. // (unless there is an error) will have their priority boosted
  77. // by this amount
  78. int reliable_on_priority;
  79. // results with a priority equal or greater than this value
  80. // will be sent to reliable hosts
  81. bool distinct_beta_apps;
  82. // allow users to select beta apps independently
  83. bool ended;
  84. // Project has ended - tell clients to detach
  85. int shmem_work_items;
  86. // number of work items in shared memory
  87. int feeder_query_size;
  88. // number of work items to request in each feeder query
  89. char httpd_user[256];
  90. // user name under which web server runs (default: apache)
  91. bool enable_assignment;
  92. bool enable_vda;
  93. bool enable_assignment_multi;
  94. bool job_size_matching;
  95. bool dont_send_jobs;
  96. //////////// STUFF RELEVANT ONLY TO SCHEDULER FOLLOWS ///////////
  97. vector<regex_t> *ban_cpu;
  98. vector<regex_t> *ban_os;
  99. vector<int> dont_search_host_for_userid;
  100. int daily_result_quota; // max results per day is this * mult
  101. double default_disk_max_used_gb;
  102. double default_disk_max_used_pct;
  103. double default_disk_min_free_gb;
  104. bool dont_store_success_stderr;
  105. int file_deletion_strategy;
  106. // select method of automatically deleting files from host
  107. int gpu_multiplier; // mult is NCPUS + this*NGPUS
  108. bool ignore_delay_bound;
  109. bool locality_scheduling;
  110. double locality_scheduler_fraction;
  111. bool locality_scheduling_sorted_order;
  112. int locality_scheduling_wait_period;
  113. int locality_scheduling_send_timeout;
  114. vector<regex_t> *locality_scheduling_workunit_file;
  115. vector<regex_t> *locality_scheduling_sticky_file;
  116. bool matchmaker;
  117. int max_download_urls_per_file;
  118. int max_ncpus;
  119. JOB_LIMITS max_jobs_in_progress;
  120. int max_wus_to_send; // max results per RPC is this * mult
  121. int min_core_client_version;
  122. int min_core_client_version_announced;
  123. int min_core_client_upgrade_deadline;
  124. int min_sendwork_interval;
  125. int mm_min_slots;
  126. int mm_max_slots;
  127. double next_rpc_delay;
  128. bool no_amd_k6;
  129. // don't allow AMD K6 CPUs
  130. bool no_vista_sandbox;
  131. bool nowork_skip;
  132. bool one_result_per_host_per_wu;
  133. bool one_result_per_user_per_wu;
  134. int reliable_max_avg_turnaround;
  135. // max average turnaround for a host to be declared reliable
  136. double reliable_max_error_rate;
  137. // DEPRECATED
  138. // max error rate for a host to be declared reliable
  139. double reliable_reduced_delay_bound;
  140. // Reduce the delay bounds for reliable hosts by this percent
  141. char replace_download_url_by_timezone[256];
  142. bool prefer_primary_platform;
  143. // When selecting app versions,
  144. // use the client's primary platform if a version exists.
  145. // e.g. send 64-bit versions to 64-bit clients,
  146. // rather than trying the 32-bit version to see if it's faster.
  147. // Do this only if you're sure that your 64-bit versions are
  148. // always faster than the corresponding 32-bit versions
  149. double version_select_random_factor;
  150. // in deciding what version is fastest,
  151. // multiply projected FLOPS by a random var with mean 1 and this stddev.
  152. int report_max;
  153. bool request_time_stats_log;
  154. bool resend_lost_results;
  155. int sched_debug_level;
  156. int scheduler_log_buffer;
  157. char sched_lockfile_dir[256];
  158. bool send_result_abort;
  159. char symstore[256];
  160. bool user_filter;
  161. // send a job to a user only if wu.batch == user.id
  162. // DEPRECATED: use assignment instead
  163. bool workload_sim;
  164. // Do workload simulation in deciding whether to send a result
  165. // scheduler log flags
  166. //
  167. bool debug_array; // debug job-cache scheduling
  168. bool debug_assignment;
  169. bool debug_credit;
  170. bool debug_edf_sim_detail; // show details of EDF sim
  171. bool debug_edf_sim_workload; // show workload for EDF sim
  172. bool debug_fcgi;
  173. bool debug_handle_results;
  174. bool debug_locality; // locality scheduling
  175. bool debug_prefs;
  176. bool debug_quota;
  177. bool debug_request_details;
  178. bool debug_request_headers;
  179. bool debug_resend;
  180. bool debug_send;
  181. bool debug_user_messages;
  182. bool debug_vda;
  183. bool debug_version_select;
  184. char debug_req_reply_dir[256]; // keep sched_request and sched_reply
  185. // in files in this directory
  186. int parse(FILE*);
  187. int parse_aux(FILE*);
  188. int parse_file(const char *dir = 0);
  189. int upload_path(const char*, char*);
  190. int download_path(const char*, char*);
  191. const char *project_path(const char *, ...);
  192. };
  193. extern SCHED_CONFIG config;
  194. #endif