From 782a11e22fde2673a25055839a7acdea1be6bc24 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 9 Jul 2013 11:17:56 -0700 Subject: [PATCH] client: don't fetch work if project has > max(2000, ncpus*100) runnable jobs --- client/work_fetch.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 27455546ea..07a3c95ba7 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -665,11 +665,13 @@ void WORK_FETCH::setup() { p->sched_priority -= rp->estimated_flops_remaining()/max_queued_flops; } - // don't request work from projects w/ > 1000 runnable jobs + // don't request work from projects w/ > 100 runnable jobs per CPU // + int job_limit = 100 * gstate.ncpus; + if (job_limit > 2000) job_limit = 2000; for (unsigned int i=0; ipwf.n_runnable_jobs > 1000 && !p->pwf.cant_fetch_work_reason) { + if (p->pwf.n_runnable_jobs > job_limit && !p->pwf.cant_fetch_work_reason) { p->pwf.cant_fetch_work_reason = CANT_FETCH_WORK_TOO_MANY_RUNNABLE; } }