mirror of https://github.com/BOINC/boinc.git
client: job scheduler tweaks to avoid idle CPUs
- allow overcommitment by > 1 CPU. E.g. If there are two 6-CPU jobs on an 8 CPU machine, run them both. - Prefer MT jobs to ST jobs in general. When reorder the run list (i.e. converting "preliminary" to "final" list), prefer job J1 to J2 if: 1) J1 is EDF and J2 isn't 2) J1 uses GPUs and J2 doesn't 3) J1 is in the middle of a timeslice and J2 isn't 4) J1 uses more CPUs than J2 5) J1's project has higher scheduling priority than J2's ... in that order. 4) is new; it replaces the function promote_multi_thread_jobs(), which did something similar but didn't work in some cases.
This commit is contained in:
parent
9608ab1645
commit
20ff585a94
|
@ -1019,6 +1019,11 @@ static inline bool more_important(RESULT* r0, RESULT* r1) {
|
|||
if (unfin0 && !unfin1) return true;
|
||||
if (!unfin0 && unfin1) return false;
|
||||
|
||||
// favor jobs that use more CPUs
|
||||
//
|
||||
if (r0->avp->avg_ncpus > r1->avp->avg_ncpus) return true;
|
||||
if (r1->avp->avg_ncpus > r0->avp->avg_ncpus) return false;
|
||||
|
||||
// favor jobs selected first by schedule_cpus()
|
||||
// (e.g., because their project has high sched priority)
|
||||
//
|
||||
|
@ -1549,7 +1554,9 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
|
|||
more_important
|
||||
);
|
||||
|
||||
#if 0
|
||||
promote_multi_thread_jobs(run_list);
|
||||
#endif
|
||||
|
||||
if (log_flags.cpu_sched_debug) {
|
||||
msg_printf(0, MSG_INFO, "[cpu_sched_debug] final job list:");
|
||||
|
@ -1657,6 +1664,7 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Don't overcommit CPUs by > 1 if a MT job is scheduled.
|
||||
// Skip this check for GPU jobs.
|
||||
//
|
||||
|
@ -1672,6 +1680,7 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
double wss = 0;
|
||||
if (atp) {
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
<?php
|
||||
|
||||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2011 University of California
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// BOINC is distributed in the hope that it will be useful,
|
||||
// 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.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// web interface for creating an app or app version
|
||||
//
|
||||
// contributor: Natalia Nikitina
|
||||
|
||||
require_once("../inc/util.inc");
|
||||
|
||||
function handle_create_form() {
|
||||
global $project, $auth;
|
||||
|
||||
page_head("Create app");
|
||||
echo "
|
||||
This form lets you specify parameters for a new application.
|
||||
|
||||
<p>
|
||||
<form action=submit_example_app.php>
|
||||
<input type=hidden name=action value=create_action>
|
||||
";
|
||||
start_table();
|
||||
row2("Application name", "<input name=app_name value=\"enter name\">");
|
||||
row2("Replication level", "<input name=replication_level value=1>");
|
||||
row2("Beta flag", "<input name=is_beta type=checkbox checked=1>");
|
||||
row2("Validator", "<select name=validator_type><option value=1 selected=1>Trivial</option>
|
||||
<option value=2>Bitwise</option></select>");
|
||||
end_table();
|
||||
|
||||
start_table();
|
||||
row2("Version number", "<input name=app_version value=\"1.0\">");
|
||||
|
||||
//Get list of registered platforms
|
||||
|
||||
//---
|
||||
//(tested on a local server)
|
||||
$link = mysql_connect("localhost","boincadm","") or die("Could not connect: " . mysql_error());
|
||||
$q = mysql_query("use test24");
|
||||
$q = mysql_query("select id,name from platform order by id");
|
||||
$options_platforms = "";
|
||||
while($f=mysql_fetch_row($q)) $options_platforms .= "<option value=$f[0]>$f[1]</option>";
|
||||
//---
|
||||
|
||||
row2("Platform", "<select name=app_platform>".$options_platforms."</select>");
|
||||
row2("Plan class", "<input name=plan_class value=\"(none)\">");
|
||||
row2("Main program", "<input name=main_program type=file> <br/>
|
||||
<input name=is_boincapp type=checkbox checked> Native BOINC application");
|
||||
|
||||
|
||||
if(isset($_GET['add_file']))
|
||||
$add_file = $_GET['add_file']+1;
|
||||
else
|
||||
$add_file = 1;
|
||||
for($i=0; $i<$add_file; $i++)
|
||||
row2("Additional file", "<input name=additional_file_$i type=file><br/>
|
||||
<input name=is_copyfile_$i type=checkbox checked>Copyfile");
|
||||
|
||||
row2("","<a href=?action=create_form&add_file=$add_file>(more additional files)</a>");
|
||||
row2("","<input type=submit name=submit value=Submit>");
|
||||
end_table();
|
||||
echo "</form>\n";
|
||||
echo "<p><a href=submit_example.php>Return to job control page</a>\n";
|
||||
page_tail();
|
||||
}
|
||||
|
||||
handle_create_form();
|
||||
|
||||
?>
|
Loading…
Reference in New Issue