Commit b3f126ec authored by Jessica Severin's avatar Jessica Severin
Browse files

Queen::synchronize_analysis_stats changed the way the AnalysisStats::num_required_workers

is calculated.  If batch_size>0 use batch_size, else use avg_msec_per_job equation.
parent 55cd98de
...@@ -437,8 +437,15 @@ sub synchronize_AnalysisStats { ...@@ -437,8 +437,15 @@ sub synchronize_AnalysisStats {
if($status eq 'READY') { if($status eq 'READY') {
$analysisStats->unclaimed_job_count($count); $analysisStats->unclaimed_job_count($count);
my $numWorkers = POSIX::ceil($count * $analysisStats->avg_msec_per_job / 300000); my $numWorkers;
# guess num needed workers by total jobs / (num jobs a worker could do in 5 minutes) if($analysisStats->batch_size > 0) {
$numWorkers = POSIX::ceil($count / $analysisStats->batch_size);
} else {
my $job_msec = $analysisStats->avg_msec_per_job;
$job_msec = 100 if($job_msec>0 and $job_msec<100);
$numWorkers = POSIX::ceil(($count * $job_msec) / (3*60*1000));
# guess num needed workers by total jobs / (num jobs a worker could do in 3 minutes)
}
$numWorkers=$count if($numWorkers==0); $numWorkers=$count if($numWorkers==0);
if($analysisStats->hive_capacity>0 and $numWorkers > $analysisStats->hive_capacity) { if($analysisStats->hive_capacity>0 and $numWorkers > $analysisStats->hive_capacity) {
$numWorkers=$analysisStats->hive_capacity; $numWorkers=$analysisStats->hive_capacity;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment