question

ahaware avatar image
ahaware asked

Same Query, Different Servers, Different Performance. Now What?

I have 2 cluster servers with 2 nodes; having Single SQL instance installed with below configuration. Production 2.6 GHZ Processor 64 GB RAM 4 CPU SQL MAX Memory 52 GB MAXDOP 1 Pre-Production 2.6 GHZ Processor 64 GB RAM 2 CPU SQL MAX Memory 52 GB MAXDOP 1 I have 1 query which is executing within 30 Sec on pre-production but taking more than 150 Sec in production. Pre-prod DB is restored from production server, having updated stats & indexes. Tested performance of query out of office hours, but giving same result. Execution plans looks similar on both servers. All SP_CONFIGURE parameters also same. Only thing is on Pre-prod hyperthreding is set to 2; while on prod is 1. Meansboth have same logical processors i.e. 4 Can you help me how to find out root cause of slow performance on Production server.
performancemaxdop
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image JohnM commented ·
Are they both physical servers?
0 Likes 0 ·
Kev Riley avatar image
Kev Riley answered
9 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev Riley avatar image Kev Riley ♦♦ commented ·
Yes but the servers have different processors, so the 'same' setting will give different results. Use High Performance (min 100% max 100%) to see if it makes any difference. Also be aware that some servers control power at the BIOS level too.
2 Likes 2 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
That could account for the difference. One might be 'balancing' higher than the other - set to High Performance and recheck.
1 Like 1 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
Setting this on Production is considered to be a best practice - you may see a difference on Production, but for the better!
1 Like 1 ·
ahaware avatar image ahaware commented ·
It is balanced on both servers
0 Likes 0 ·
ahaware avatar image ahaware commented ·
Same on both servers. Min 5% & Max 100%
0 Likes 0 ·
Show more comments
salliven avatar image
salliven answered
What happening if you run 2 times the query on both servers? The running time is different in 2th time?
5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ahaware avatar image ahaware commented ·
Getting same execution time even after running same query multiple times
0 Likes 0 ·
salliven avatar image salliven commented ·
Okay. And the session settings are same on both case? Maybe it is different.
0 Likes 0 ·
ahaware avatar image ahaware commented ·
Which session settings?
0 Likes 0 ·
salliven avatar image salliven commented ·
The connected session settings on both case. For example: set quoted_identifier on set ansi_null_dflt_on on
0 Likes 0 ·
ahaware avatar image ahaware commented ·
I am not explicitly including above settings while running query on both servers.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.