This is really bad, at least for Windows Vista. Since my machine has been setup and getting more and more stable, I'm starting to play with the four cores. Oh, yeah~~! I spent $300, would I be happy to see some exciting performance? Hmm.....
The story is always beautiful... Look at this experiment I did last night:
Keep your task manager open and switch to the performance page.
First, I run TAT and started core 0 and core 1. OK, then I see core 0 and 1 are now at 100% load while core 2 and 3 are close to idle, mainly around 5% usage at most. The TAT program starts two processes, named MeromMaxPowerVerOp3.exe. Now I checked the affinity of these two processes, one is with core 0 only and the other is core 1 only. That's expected, that's good.
Then, I started Orthos which suppose to start two head-duty threads. But what I found in the task manager is, this didn't give core 2 and 3 100% load as expected. Actually it does not give core 2 and 3 any load at all. OK, at this stage I assume Orthos has affinity to core 0 and 1 either. But to my surprise, Orthos.exe has affinities with all the four cores. But it seems Orthos is attempting to use only core 0 and 1 (fromt its interface and purpose). That's weird. I think I need to investigate how it can do that whichout setting affinity.
Now, the next step I did the following thing: I set the two processes of TAT to be affinity with core 2 and 3 respectively and set the affinity of Orthos to be with core 0 and 1. Oh, yeah~~! This is the first time I see my CPU at 100% fully load!
Then, I planned my next experiment. I now set the affinity of Orthos.exe only for core 0 and leave core 1 with no heavy-duty tasks. Now I started Firefox. It is kinda ok, still response but not prompt, got slagged a lot when refresh a long page. What happened? As you start a program, if your program doesn't respecify, Windows would set the default affinity to all cores. And the scheduler is not that smart: it won't skip the heavy load cores. Your program would somehow hit those cores a little bit.
The last step is to set the affinity of Firefox to core 1. Now it runs almost as if it has the whole computer unless it needs to access the disk (That's actually true. My 2G memory is not sufficient and need to swap anyway).
This is really not good. So, I'm planning to write a tool that can do this kind of manual "scheduling" by providing user an easy interface to define rules. Then application affinities are dynamically assigned by the program to achieve better CPU usage, better interaction, etc... Any information or idea about how to do this would be welcomed. And if you want to join me, please contact me and I would be happy to have some companions to work together;-)
Friday, September 14, 2007
Subscribe to:
Post Comments (Atom)
2 comments:
Is there any power consumption concern which lead the scheduler try to schedule the same core with the other two idle at the time? just curious.
Doesn't make sense. From the thermal point of view, scheduler should distribute the workload evenly between cores so the temperature distribution would be even over the whole surface of the die, which leads to better head removal and less thermal damage potential.
Post a Comment