Single-threaded programs on i7 quad core processors.

Single-threaded programs on i7 quad core processors.

Hello,Based on observation, it would seem that a CPU-bound effectively single-thread program running on, say, the i7-2729QM processor can use only 1/2 the CPU power of one core. This is different from my older dual core system where an application could grab 100% of one of the two cores.First, is that understanding correct? Second, is there any way to finese that, and let a thread use 100% of a core's capabilities? Setting affinity (from what I can tell) only says which core to partially use.Thanks,Richard

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you prefer to run a single thread, it doesn't make sense to regret that you aren't running multiple threads per core. In fact, you probably want to turn off HyperThreading, particularly if you dislike seeing partly used logical processes int WTM graphs.
Turbo Mode has more upside when running a single thread. Not that I want to discourage you from learning about threaded parallelism.

Oh, I definitely intend to be learning and exploiting threaded parallelism. However, that isn't an option when running somone else's program. Turn off hyperthreading? That sounds very promising for the odd CPU-bound legacy program. I'll see if I can do it when my new computer arrives next week. Thanks!R

R

Do you run your program(s) on a stand-alone system without operating system? (a rhetorical question)

Most likely you are running on a Windows platform or Linux, Mac, Unix, ...
And you are likely running other applications concurrently with the "someone else's program" you like to use. Perhaps email is running in the background or Internet radio, some anti-virus,etc... Whatever else is running can take advantage of the other cores on the system. Turning off HT might help your single thread app (I think TimP suggested this). I think you will need to run some test to see what you actually observe for a difference. Because, if you turn HT off now, you will likely forget about it 6 months from now. At some future date you may have extra demands on your system where HT will yield a net benefit - but you won't use it because you forgot about it.

Window's 7 might have a smart enough scheduler to be sensitive to core temperatures and relocate threads accordingly (distribute amongst cores as opposed to cramming on HT siblings). So HT on/off may be a moot point for the general user.

Jim

www.quickthreadprogramming.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today