Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Query performance difference -- CPU time difference on two servers

$
0
0

Two SQL servers, server A & B, Hardware information as below:
Server A: Clustered. Two physical processors (4 cores). RAM 64GB, SQL Server max memory: 58GB.
Server B: Standalone. One physical processor (4 cores). RAM 16GB, SQL Server max memory: 10GB.

The two databases on A & B are identical (using backup & restore method), same query execution CPU time are different, it is slower on the cluster server with more CPU & Mmeory. I tried many times and all same result, I also tried run DBCC DROPCLEANBUFFERS& DBCC FREEPROCCACHE before running the query.

When I run the query, on Server A (Slow one), CPU usage is at 20% ~30%. RAM usage is 14%. It is new set up environment so just me using it now.
When I run the query on Server B (Fast one), CPU usage is 40%, RAM usage is 85%.
Both two servers have SAN connected storage.

Query execution plan is exactly same on two serers.

Could someone give me some advise how to troubleshoot this problem? Any suggestion is appreciated a lot! Thanks a lot!

FYI, Below are the statistics when running same query in same DB on two servers:

Server A CPU & IO Statistics:

SQL Server parse and compile time: 
   CPU time = 109 ms, elapsed time = 297 ms.
(1005301 row(s) affected)
Table 'PODT'. Scan count 1, logical reads 55184, physical reads 3, read-ahead reads 55180, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'MRICLDEFENT'. Scan count 0, logical reads 71898, physical reads 3, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'POHD'. Scan count 1, logical reads 103154, physical reads 3, read-ahead reads 103150, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

 SQL Server Execution Times:
CPU time = 7769 ms,  elapsed time = 16693 ms.

Server B CPU & IO Statistics:

SQL Server parse and compile time: 
   CPU time = 32 ms, elapsed time = 39 ms.
(1005301 row(s) affected)
Table 'PODT'. Scan count 1, logical reads 55184, physical reads 3, read-ahead reads 55180, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'MRICLDEFENT'. Scan count 0, logical reads 71898, physical reads 3, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'POHD'. Scan count 1, logical reads 103154, physical reads 3, read-ahead reads 103150, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

 SQL Server Execution Times:
CPU time = 3931 ms,  elapsed time = 14387 ms.                             

       

Viewing all articles
Browse latest Browse all 5123

Trending Articles