Click to See Complete Forum and Search --> : Pentium 4 HT
Mr. Tomaszek
September 7th, 2004, 04:28 AM
Hi, I've got question for someone familiar with Pentium 4 HT processors. I have wrote app that performs some time consuming actions. When app is running it consumes 100% CPU time (according to taskman). When I'm running it on P4 HT CPU taskmas shows that it is consuming _only_ 50% CPU, on dual P4 HT 25% CPU and so on. Does this mean that on P4 HT I can run two instances of this app without loosing preformance? And if not, what should I do to squeez 100% of P4 HT CPU time when running single instance of this app. Or - there is everything the same just as in normal P4 except taskman indications?
Thanx in advance,
Joe Nellis
September 7th, 2004, 10:32 AM
I'm no expert on Intel chips but as I understand it the HyperThreading creates 2 virtual cpus. Having two of these chips would imply four virtual cpus. Now perhaps that windows is only reporting on just one of those virtual cpus and not the aggregate. Thus you get 50% and 25% readings. Somehow XP has predetermined that a X Mhz processor does Y amount of work so it scales to that and this is why you get half and quarter load readings.
I could be completely wrong but that is my best guess.
Mr. Tomaszek
September 7th, 2004, 10:59 AM
Yeah, I know that, but if taskman indicates 50% usage can I run second instance of a app and expect the same performance as first one; and can I make it 100% on single instance to speed up app? (for second I guess the answer is: not)
KevinHall
September 7th, 2004, 03:29 PM
I don't know exactly how the task manager computes CPU usage, so read this response with that in mind.
A given thread can only run on one CPU at a time -- be it virtual or real. So if your program only runs a single thread, then it makes sense that it will not use up 100% of the processing power of your computer. Solution: if your application is single threaded, is there a way for you to make it multi-threaded?
If that isn't the problem, then I have one other idea. Sometimes even program that are computationally heavy still need to wait on certain events to happen putting threads or the entire application to sleep during that wait. If this is the case with your application, you might be able to redesign your application or there may not be much you can do at all.
Anyway, I hope this has helped a little at least.
Davey
September 7th, 2004, 04:27 PM
I'm not sure what HT does exactly (short of making the OS think it has 2 CPUs, but I always turn HT off as I always get bad performance with it.
I've found that processor performance decreases quite significantly with HT turned on especially when using IIS under heavy loads.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.