Erratic CPU utilization when batch processing in background

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Erratic CPU utilization when batch processing in background

JonNathan
Erratic CPU utilization when batch processing in background

I'm wondering if anyone else has observed strange CPU-utilization behavior when using the ImageJ batch processing feature.  My situation is this: I've written some math-intensive plugins that I use to process large image stacks (typically ~200MB in size), and I have about a hundred or so of these stacks to process. My plugin sets the PARALLEL_PROCESSING flag so that I can utilize my Mac Pro's 16 available cores, and I typically see about 95% total CPU usage while the plugin is working on an individual image stack. Since each image stack takes about 2 minutes to process completely, I like to use ImageJ's batch process feature to do all the processing automatically in the background while I do other things on my computer (non-CPU-intensive stuff like emailing, etc.)

The strange behavior I've noticed is that while ImageJ is working in the background, CPU utilization will drop dramatically (usually below 10%) at seemingly random times (but often after about 5 files are processed).  At those points, if I bring ImageJ to the front of the Mac Finder again, the batch process will immediately pick up speed and resume using all the CPU power.  Leaving ImageJ again will eventually result in the same drop in CPU usage.

An obvious solution is to keep the ImageJ application active all the time, but that prevents me from doing anything else useful with my machine in the meantime -- not an ideal solution.

I see the same behavior whether I run under Java 6, 7, or 8, so I don't think it's related to the JRE version.  I only started seeing this behavior after upgrading to Mac OS 10.9 -- don't if that makes a difference.  I use a Mac Pro 2 x 2.93 quad-core Xeon running OS 10.9.5, 16GB RAM, ImageJ 1.49h allotted with 12GB memory and 16 cores.

Any help would be appreciated --

Thanks,

Jon Marsh