I have been doing some image processing on my computer using Erdas Imagine. Specifically, I am running a 5x5 median filter on imagery. I can specify the number of processes that occur simultaneously within the Erdas batch command window. I have been observing unusual behavior when I specify 16 simultaneous processes, which lead me to double check the number of processors on the machine. I used the following command prompt command to assess the number of processors:
wmic cpu > cpu.txtWhich yielded (in part):
Number of Cores: 8
Number of Logical Processors: 16How does the number of cores differ from the number of logical processors in the context of software like Erdas imagine where the user can specify the number of simultaneous processes? I am trying to determine if I should be specifying 8 or 16 simultaneous processes to maximize efficiency.
23 Answers
Hyper-threading will make one physical core appear to the OS as two.
Hyper-threading essentially allows one core to execute two sets of instructions at once, depending on the nature of the instructions. When it was first introduced (back in 2002, and it was quite the buzz at the time, with overclockers and then-new bloggers going crazy debating HT vs. true multicore - some things never change) it was sort of like "dual core lite". To make the use of hyperthreading transparent to existing software and operating systems, they were designed to appear as two cores, and so the kernel could continue using its existing scheduling and load balancing and take advantage of hyperthreading without any changes (later, of course, optimizations were made). That's why it started that way - so that hyperthreaded CPUs could just be drop-in replacements on platforms that already had multiprocessor support anyways.
Anyways, since efficiency will depend on the nature of the application you may wish to do a bench mark at 8 and 16 (and higher if the processes are not CPU bound but, e.g. network or IO bound).
2Number of cores (8) represents the actual number of physical cores. For each processor core that is physically present, the operating system addresses two virtual or logical cores, and shares the workload between them when possible.
Where multiprocessing systems include multiple complete processing units, multithreading aims to increase utilization of a single core by using thread-level as well as instruction-level parallelism. As the two techniques are complementary, they are sometimes combined in systems with multiple multithreading CPUs and in CPUs with multiple multithreading cores.
See Wikipedia's articles on HyperThreading and Multithreading.
1A logical CPU is usually used to describe the grand total of CPUs on the chip. the 8 cores are physical cores that exist on the chip. So each CPU can address to processes at once giving you 16 logical processors. The hyper-threading allows a core to complete two tasks at once. So as you have 8 cores each hyper-threading you will have a total of 16 logical processors.
In the basic sense the cores are real i.e. you have 8 physical cores on your chip. While logical processors is anything on the chip that can do a calculation. All cores are logical processors but not all logical processors are cores.
1