Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

CXPACKET wait type Expand / Collapse
Author
Message
Posted Wednesday, January 6, 2010 9:00 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:36 PM
Points: 4,473, Visits: 6,405
GilaMonster (1/4/2010)
Please post new questions in a new thread in future.

If you look while the query is running, there will be at least one thread that doesn't have a cxpacket, that has a different wait type. Whatever that is is what's holding the query up. What is it?

I usually recommend generic performance tuning (tune the query, tune the indexes) before panicking over CXPackets. It's quit common to see them on non-optimised queries.


A perfect example of this is this statement: " but in some cases I could greatly reduce query execution time (and CXPACKET waits) by using the OPTION LOOP JOIN"

that is a clear indication of a suboptimal query.


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #842903
Posted Friday, April 9, 2010 7:52 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 20, 2014 1:11 PM
Points: 27, Visits: 475
chileu17 (10/21/2008)
Sorry SqlGuru I think I couldn't explain to you my question. I do understand your point, BUT how do I implement what you are talking about?More indexes?new transactions?I know that the most probable answer is that it depends on every case right lol well I have a dedicated server with no other apps running on it. It runs on Windows server 2003 with a HD of 150 gb with a redundant SAN. We have installed a RAID 5 on it please any suggestions are welcome. Thanks in advance again.


Did you check the IO of this query? using set statistics io on, or any DBA tools, or just DMV -- use Hilary Cotter's blog he published a bunch I used all the time that I don't have to repeat here.
You can break the query into smaller transactions, better indexes to get better plan (you will see IO reduced). Increase RAM, replace with faster logical or physical drives, such as change RAID 5 to RAID 10, it depends how much overhaul you want? how much money you want to spend?


Jason
http://dbace.us
Post #900527
Posted Friday, April 9, 2010 8:12 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:36 PM
Points: 4,473, Visits: 6,405
jswong05 (4/9/2010)
chileu17 (10/21/2008)
Sorry SqlGuru I think I couldn't explain to you my question. I do understand your point, BUT how do I implement what you are talking about?More indexes?new transactions?I know that the most probable answer is that it depends on every case right lol well I have a dedicated server with no other apps running on it. It runs on Windows server 2003 with a HD of 150 gb with a redundant SAN. We have installed a RAID 5 on it please any suggestions are welcome. Thanks in advance again.


Did you check the IO of this query? using set statistics io on, or any DBA tools, or just DMV -- use Hilary Cotter's blog he published a bunch I used all the time that I don't have to repeat here.
You can break the query into smaller transactions, better indexes to get better plan (you will see IO reduced). Increase RAM, replace with faster logical or physical drives, such as change RAID 5 to RAID 10, it depends how much overhaul you want? how much money you want to spend?


jswong05, please note the last post date on threads when you are replying to them. this one hasn't been touched in months. :)


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #900557
Posted Friday, April 9, 2010 8:16 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 20, 2014 1:11 PM
Points: 27, Visits: 475
flyme4ual (10/14/2008)
Hi guys,

I'm seeing CXPACKET wait types in one of my database running SQL2005 which causing the CPU hit 100%. The server is 64 bit Windows 2003 with 8 CPU. Several tables contain over 10 million rows. Does anyone encounter this issue before and what was done to fix the problem?

Thanx.

When you started this question, you didn't provide what you have looked at, such as is your disk fragmented? index fragmented?
Did you query DMV for the top CPU sessions like so? (What do you see?) Once picked up the CPU culpit, did you interrigate the query efficiency with index scheme? I can go on and on ..... You have to check into a specific culpit, we can then advise you a solution.

WITH QPLAN AS
(
SELECT TOP 10 SUM(QS.TOTAL_WORKER_TIME) AS
TOTAL_CPU_TIME, SUM(QS.EXECUTION_COUNT) AS
TOTAL_EXECUTION_COUNT, SUM(QS.TOTAL_WORKER_TIME)/SUM(QS.EXECUTION_COUNT) AS EACHEXECUTION, COUNT(*) AS
NUMBER_OF_STATEMENTS, SQL_TEXT.TEXT,
QS.PLAN_HANDLE FROM SYS.DM_EXEC_QUERY_STATS
QS CROSS APPLY
SYS.DM_EXEC_SQL_TEXT(SQL_HANDLE) AS SQL_TEXT
GROUP BY SQL_TEXT.TEXT,QS.PLAN_HANDLE
ORDER BY SUM(QS.TOTAL_WORKER_TIME) DESC
)
SELECT * from QPLAN CROSS APPLY sys.dm_exec_query_plan(QPLAN.PLAN_HANDLE)


Jason
http://dbace.us
Post #900561
Posted Friday, April 9, 2010 8:20 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 20, 2014 1:11 PM
Points: 27, Visits: 475
Yes, you are right. I have not come in here for months, just reading as new. I did not see his comments that he resolved the problem.
My point is people tends to post "my system does not work" missing the precise description or what thye have tried to resolve the problem. Is he using SP2 (no mentioned)? That is why skyview answers were provided to him.


Jason
http://dbace.us
Post #900566
Posted Tuesday, July 20, 2010 4:12 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 25, 2014 2:47 PM
Points: 587, Visits: 1,998
NOTE: if you have hyperthreading enabled it gets MUCH worse. Consider disabling HT if you are seeing logs of CXPACKET waits first, then reevaluating and if necessary adjust MAXDOP.


where to verify whether hyperthreading is enabled or not?

We have Windows 2003 R2 enterprise edition x64 and CPU is PIII Xeon with speed 2834 MHZ

Thanks
Post #955979
Posted Monday, November 1, 2010 2:58 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, November 24, 2014 2:15 PM
Points: 258, Visits: 1,103
(I know the last post on this thread is over 2 months old but no one answered the last question posted.)

You will most likely find the enabling or disabling of hyperthreading to be in your server's BIOS.

LC
Post #1014151
Posted Monday, February 28, 2011 1:56 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 10, 2014 12:22 PM
Points: 2,671, Visits: 787
For me, CXPACKET was fixed by not allowing SQL to have all the processors and all the memory. I removed one of the processors (Properties | Processor of the server - do not "Automatically set processor affinity mask for all processors") and then allocating some of the memory for the system. We had reporting services eating up the memory and gave it 8 Gig of the 32 Gig available and this straightened up most of the difficulty.

Jamie
Post #1070815
Posted Tuesday, March 1, 2011 7:32 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:36 PM
Points: 4,473, Visits: 6,405
Jaimie, please don't post to threads that were started 2.5 years ago . . .

Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1071236
Posted Wednesday, July 27, 2011 8:07 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, June 10, 2014 6:14 AM
Points: 1,200, Visits: 3,237
aNY SOLUTION?
Post #1149209
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse