Solved

Why does app use only 25% of dual cpu

Posted on 2006-11-20
6
256 Views
Last Modified: 2010-04-18
Hi

I am new to multiple cpu's and win3k.

I have an application which performs a batch task. On a 64bit 2400 athlon running 32bit Win3k it uses 100% and performs the task quickly.

On a dual xeon 2.4ghz it only uses 25% cpu usage and takes 4 times as long as the single machine to do the job.

Can somebody please explain why an application that uses 100% cpu on a single cpu machine, only uses 25% of a dual xeon machine?

Thanks
0
Comment
Question by:zattz
  • 3
  • 3
6 Comments
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 500 total points
ID: 17977988
A dual Xeon presents 4 processors to the OS - each physical CPU is hyperthreaded (HT) and each HT CPU is seen as two.  So 2 physical CPUs times 2 for HT gives you 4 processors (according to Windows).

An Athlon64 doesn't offer HyperThreading (HT is an Intel only feature - AMD does offer HyperTransport, but that's not the same thing).  So unless you have two cores in the athlon or a second CPU, the athlon is only seen as 1 CPU.

So you're thinking, "fine, by why still only 25%?"

Because the application only has ONE Thread.  In order to take advantage of multiple processors, you need the application to utilize MORE than one thread.  Think of it like having a kitchen and each person in the house is capable of washing dishes, but there's only one sink.  You can't have more than one person washing the dishes at the same time (drying doesn't count).  So even if you brought friends over, you couldn't wash the dishes any faster unless you had more sinks (threads).
0
 

Author Comment

by:zattz
ID: 17978072
Leew,

That's what I was thinking, hmm

I forgot to mention the application queries a MS Sql server.

If the application does a single query, would the query run as one thread on MS SQL and use one cpu, or would it be spread over multiple?

Thanks
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 17978209
I'm not sure - SQL is multithreaded, but I'm not sure how it's multithreaded.  A single, SIMPLE query almost certainly executes in one thread.  A query that uses subqueries and/or joins may use more than one thread.  But that's just a guess.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:zattz
ID: 17978215
Makes sense to me...

Although if I go to task mngr, the cpu graphs show equal activity across all cpu's... and yes it is a very single query, no joins... Maybe windows is lying?

0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 17978230
It's possible task manager isn't being entirely accurate... when looking at the processes tabs I've seen that claim lots of idle time then look at the graph and it's pegged...
0
 

Author Comment

by:zattz
ID: 17978243
Okay. Thanks a lot for your help:)
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question