Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no 100% cpu usage by com+ component

Status
Not open for further replies.

Neme5is

Programmer
Sep 30, 2002
8
0
0
NL
Hey,

I've built a COM+ component in VB6 running on a Windows2000 server, which i want to execute as fast as possible. When I use it though, it only uses about 15% of the cpu. Is there a way to make the COM+ component use more cpu resource?

Tijmen
 
What does it do?
If you have 15% usage on the CPU that means the COM objects aren't actually being used most of the time.

COM object don't generally do anything unless they are told to. Then they do what they are told and return back to the client app. Using more CPU doesn't make it go faster. Think of it as calling a cab. If your in a cab for 1/2 hour going to work and a half hour coming back from work then the cab (if you are the only customer) is only using ~ 4% of the capacity of the day. Cab is limited by the speed limit (speed of your system) Now while its is running if it only uses 15% of the CPU and there is about 85% free then you are out of luck. Having the object on a higher priority thread won't give you much of a performance increase at all because for one reason or another the object is waiting on resources out of its control.

If you want your object to run faster and your box is at 85% Idle then you need to look at the way you are coding to get performance increases. And you might find that you can make your objects twice as fast and actually lower the amount of CPU utilisation.

If all you want is to see the COM object use as much CPU as possible have a method in your object compute the prime numbers from 1 to a billion constantly.

 
thanx m8, we have looked at the problem.. we at first thought there would be something like a maximum of proc space an object could have or something on win2k..
but we have found out now that it must be the harddisc running very slow for some reason..

on an 'ordinary' computer (celly 700) running windows xp it will operate 30-40 seconds faster and using 100%cpu
then the server(p3 1ghz). it seems to be waiting (for hd completion??)

we have actually speed up the code quite dramatically..

ah well we will fight this sooner rather then later ;-)

thanks for the reply :)

Nemesis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top