If you spawn 4 processes, each with one thread, you end up with 4 threads. To the hardware, it doesn't matter whether they are from the same process or from different ones. These four threads will get scheduled on the 4 (logical) cores that the OS sees, filling up your machine completely.

-Wim


On 28/06/2012 17:22, Xavier Noria wrote:
I run htop today in my new MacBook Air 11'', with two i7s (Ivy Bridge) and realized it reports 4 CPUs.

People on Twitter pointed out to hyper-threading, and descriptions of that technology focus on being able to run more *threads* on the same core.

For example, Intel says[*]:

"IntelĀ® Hyper-Threading Technology (IntelĀ® HT Technology)1 uses processor resources more efficiently, enabling multiple threads to run on each core. As a performance feature, Intel HT Technology also increases processor throughput, improving overall performance on threaded software."

Therefore, I expected a single-threaded program that forks several processes to saturate only two logical cores.

But all the logical cores get busy, see this video:

http://www.youtube.com/watch?v=R_HlNhGYVIQ

Note the gauges and the percents in the process list.

Can you help me interpret that?

Xavier

[*] http://www.intel.com/content/www/us/en/architecture-and-technology/hyper-threading/hyper-threading-technology.html


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
htop-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htop-general

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
htop-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htop-general

Reply via email to