ImageJ number of cores setting and hyperthreading

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

ImageJ number of cores setting and hyperthreading

lechristophe
Hi,

I just got a new laptop with an i7 dual core processor that supports
hyperthreading. Should I set the number of cores in the ImageJ options to 2
or 4? In other words does ImageJ benefit from hyperthreading?

Thanks for the help,

Christophe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ number of cores setting and hyperthreading

Michael Schmid
Hi Christophe,

ImageJ does benefit from hyperthreading.
On my dual-core i5 processor a median filter with radius 10 on a 1024*1024 noise image needs about
  1.5 seconds with 2 threads
  1.0 seconds with 4 threads.

Hyperthreading means that the processor core works on the other thread while it waits for data to be fetched from memory. So you won't see much difference for very small images where all data fit into the cache, but you will get a speed gain for larger images.

Of course, functions or plugins benefit only if they use parallelization. E.g. you won't see a difference for 'Find Maxima', which uses a single thread.

Michael
________________________________________________________________
On May 28, 2015, at 10:02, Christophe Leterrier wrote:

> Hi,
>
> I just got a new laptop with an i7 dual core processor that supports
> hyperthreading. Should I set the number of cores in the ImageJ options to 2
> or 4? In other words does ImageJ benefit from hyperthreading?
>
> Thanks for the help,
>
> Christophe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ number of cores setting and hyperthreading

Stephan Janosch
In reply to this post by lechristophe
Am 28/05/15 um 10:02 schrieb Christophe Leterrier:
> In other words does ImageJ benefit from hyperthreading?

Your JVM will benefit from the multiple cores. As the JVM is running
ImageJ, ImageJ will benefit.

You should set the number of threads to the number of cores. Depending
on the model of your i7 cpu, you might even set the number to 8. Your
task manager usually shows you the number of usable cores which can
execute each a thread in parallel.

Depending on the plugins you use, you will see benefits. They either
look for the number of threads set or ask the JVM for the number of CPU
cores usable. Then the plugin executes it's workload in parallel.

BUT not all plugin have built in parallelism, so your milage my vary.

Have a good time with your new device.
Stephan

--
Stephan Janosch
Software Engineer - TransgeneOme Database
https://transgeneome.mpi-cbg.de

Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstr. 108
01307 Dresden
Germany

Room: 205
Phone: +49 351 210 2709
Email: [hidden email]
Web: www.mpi-cbg.de
Twitter: https://twitter.com/TransgeneOme

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html