Windows, single thread apps & dual core

Natarian

Distinguished
Apr 5, 2006
33
0
18,530
I understand that apps need to be written with multithreading for dual core CPUs to utilise the 2 cores, but when running single core apps (that Im aware of) like Dr DivX or DVD Shrink, task manager shows me that the two cores are working about evenly in the 2 graphs. Does Windows even out workload onto 2 CPUs? And if apps need to be "multithread"capable" to utilise 2 cores then how come I can set almost any app (not background service) in task manager to run any core I choose (by right clicking on the process then choose set affinity).

I'm using a Pentium D 830.

Who's got any info, I would appreciate it, Happy Easter.

thanx
 

MadModMike

Distinguished
Feb 1, 2006
2,034
1
19,780
Happy Easter

Likewise my protestant mate.

Windows Task Manager is about as basic as it gets, it thinks there is 1 CPU, and therefore when 1 is @ 100%, it shows each being @ 50%, because it's stupid. Windows lets you choose affinities so if you have, say, 4 processors in a system, and you run 4 applications, you can let each application run on each processor, instead of having all 4 work on all 4 and having alot of waiting, unnecessary stalls, etc.

Windows isn't really Multi-Threaded, at least not as good as it should be. Windows won't without setting affinities evenout the workload, at least not to a mattering degree.

~~Mad Mod Mike, fixin' the world 1 rig at a time
 

spud

Distinguished
Feb 17, 2001
3,406
0
20,780
I understand that apps need to be written with multithreading for dual core CPUs to utilise the 2 cores, but when running single core apps (that Im aware of) like Dr DivX or DVD Shrink, task manager shows me that the two cores are working about evenly in the 2 graphs. Does Windows even out workload onto 2 CPUs? And if apps need to be "multithread"capable" to utilise 2 cores then how come I can set almost any app (not background service) in task manager to run any core I choose (by right clicking on the process then choose set affinity).

I'm using a Pentium D 830.

Who's got any info, I would appreciate it, Happy Easter.

thanx

The OS will manage seperate threads but not as well as software designed to be threaded.
 

ltcommander_data

Distinguished
Dec 16, 2004
997
0
18,980
On a side note, many video applications are multithreaded, but just not multi-processor aware. For example VirtualDub is actually divided into multiple threads for UI, I/O, processing, and previewing. In general, the threads are serialized with the processing thread, but in dual-core systems, Windows can place the Input operations separate from the encoding operations. A bigger performance gain would be found if the application was actually written for multi-cores in mind and so would have balanced operations between threads for better load distribution. Programs like Dr. Divx and DVD Shrink are probably in a similar situation to VirtualDub which is why they show a bit better core utilization.
 

voxel

Distinguished
Mar 27, 2006
143
0
18,680
To take full advantage the app needs to be multithreaded - "easy said than done" to borrow a cliche for certain types of apps.

While I don't recommend setting processor affinities, it can help with certain applications by forcing them to use another CPU core and as MadModMike said avoid stalling... What happens sometimes is 2 CPU-hungry processes will be scheduled to operate on say core 1 while core 2 gets only lower CPU hungry tasks (I'm guessing the scheduling is round-robin?) and becomes mostly starved. Windows can be quite stupid sometimes.
 

spud

Distinguished
Feb 17, 2001
3,406
0
20,780
And that's where you dual-core users fail to see. :twisted:
When I load a single thread app at 100%, both of my AthlonMP increases in temperature at half of an actual full load for each core.
That's with both affinity ticked.

Windows does split up commands, but you're still getting single thread performance in the end.

Word.
 

voxel

Distinguished
Mar 27, 2006
143
0
18,680
Windows does split up commands, but you're still getting single thread performance in the end.

When the app is multithreaded you do get twice the performance. I've benchmarked Maya + Mental Ray (single vs. two threadeds) and found exactly the render time to be half.

What's cool is that you can run TWO single-threaded renderers (i.e Pixar's RenderMan) on a dual-core CPU at 100% and get TWO frames instead of one.

Unfortunately, I'm sure 95% of the apps out there are single-threaded.
 

Wakeboardin

Distinguished
Apr 14, 2006
3
0
18,510
I have my own question, you say in windows if 1 core is working at 100% in the task manager it will show both at 50%. Is there anything that'll show real cpu usage? Also you'd think somebody would have written some sort of patch to windows to help multi-threading pair up with multiple cores that promotes pararalism.
 

TRENDING THREADS