- sched: adjust the vbox??_mt plan classes to use 1.5 CPUs instead

of the full 2 CPUs. Vboxwrapper uses ceil() to allocate enough
        whole CPUs for Virtualbox.  Ideally this will cause the BOINC
        client-side scheduler to use the remaining fraction of the CPU
        for GPU data transfer which will then free up one whole CPU for
        another job.  All without over-commiting anything.
        
    sched/
        sched_customize.cpp

svn path=/trunk/boinc/; revision=25120
This commit is contained in:
Rom Walton 2012-01-21 18:51:37 +00:00
parent 5eb81e7311
commit be9e807e31
2 changed files with 20 additions and 7 deletions

View File

@ -852,3 +852,14 @@ Rom 21 Jan 2012
samples/vboxwrapper
vboxwrapper.cpp
Rom 21 Jan 2012
- sched: adjust the vbox??_mt plan classes to use 1.5 CPUs instead
of the full 2 CPUs. Vboxwrapper uses ceil() to allocate enough
whole CPUs for Virtualbox. Ideally this will cause the BOINC
client-side scheduler to use the remaining fraction of the CPU
for GPU data transfer which will then free up one whole CPU for
another job. All without over-commiting anything.
sched/
sched_customize.cpp

View File

@ -550,18 +550,20 @@ static inline bool app_plan_vbox(
}
if (strstr(plan_class, "mt") && can_use_multicore) {
// Use number of usable CPUs, taking user prefs into account
double ncpus = g_wreq->effective_ncpus;
// number of usable CPUs, taking user prefs into account
int nthreads = (int)ncpus;
if (nthreads > 2) nthreads = 2;
hu.avg_ncpus = nthreads;
sprintf(hu.cmdline, "--nthreads %d", nthreads);
// CernVM on average uses between 25%-50% of a second core
// Total on a dual-core machine is between 65%-75%
if (ncpus > 1.5) ncpus = 1.5;
hu.avg_ncpus = ncpus;
hu.max_ncpus = 2.0;
sprintf(hu.cmdline, "--nthreads %f", ncpus);
} else {
hu.avg_ncpus = 1;
hu.max_ncpus = 1;
}
hu.max_ncpus = hu.avg_ncpus;
hu.projected_flops = capped_host_fpops()*hu.avg_ncpus;
hu.peak_flops = capped_host_fpops()*hu.avg_ncpus;
hu.peak_flops = capped_host_fpops()*hu.max_ncpus;
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,
"[version] %s app projected %.2fG\n",