![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. |
#3
| |||
| |||
|
|
RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#4
| |||
| |||
|
|
Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#5
| |||
| |||
|
|
A Quad core processor will count a 4 CPU's by SQL Server (kinda cool huh). I'm not sure what you mean by multiplex, but striping will not gain you anything from the multi-threading perspective. If you can put tables being joined on different drives, or even better, partition them across different drives, then the Query Optimizer can run more threads on your query and spread the I/O out even further. Perhaps this is what you mean by multiplex? -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "RG" <nobody (AT) nowhere (DOT) com> wrote in message news:B89C58DE-F69C-4623-AF5A-AEF2D6F17306 (AT) microsoft (DOT) com... Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#6
| |||
| |||
|
|
Are you saying that in sql server it is better to have, as an example, 2 db files on two separate physical drives rather than having one db file on raid drive which is striped across 2 physical drives? "Jay Konigsberg" <spam (AT) nospam (DOT) org> wrote in message news:eOO6Kv$vKHA.4752 (AT) TK2MSFTNGP04 (DOT) phx.gbl... A Quad core processor will count a 4 CPU's by SQL Server (kinda cool huh). I'm not sure what you mean by multiplex, but striping will not gain you anything from the multi-threading perspective. If you can put tables being joined on different drives, or even better, partition them across different drives, then the Query Optimizer can run more threads on your query and spread the I/O out even further. Perhaps this is what you mean by multiplex? -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "RG" <nobody (AT) nowhere (DOT) com> wrote in message news:B89C58DE-F69C-4623-AF5A-AEF2D6F17306 (AT) microsoft (DOT) com... Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#7
| |||
| |||
|
|
Are you saying that in sql server it is better to have, as an example, 2 db files on two separate physical drives rather than having one db file on raid drive which is striped across 2 physical drives? "Jay Konigsberg" <spam (AT) nospam (DOT) org> wrote in message news:eOO6Kv$vKHA.4752 (AT) TK2MSFTNGP04 (DOT) phx.gbl... A Quad core processor will count a 4 CPU's by SQL Server (kinda cool huh). I'm not sure what you mean by multiplex, but striping will not gain you anything from the multi-threading perspective. If you can put tables being joined on different drives, or even better, partition them across different drives, then the Query Optimizer can run more threads on your query and spread the I/O out even further. Perhaps this is what you mean by multiplex? -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "RG" <nobody (AT) nowhere (DOT) com> wrote in message news:B89C58DE-F69C-4623-AF5A-AEF2D6F17306 (AT) microsoft (DOT) com... Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#8
| |||
| |||
|
|
If you have sufficient I/O, then it is a good idea to create multiple files. The rule of thumb is to create one file for each CPU core that is available to SQL Server. That allows better parallelism. |
|
RG, It depends. Specifically what you want to optimize. If there is one big query (OLAP type scenario) that trumps the importance of all other queries, and you are running in single user mode, and the query selects from two table (for example with a Merge Join or Hash Join) where the tables are about the same size, then two files on two separate drives, each with one of the tables would be the ideal situation, because each drive would work separately and can maximize sequential reads. If any of the "ifs" is not present, the situation gets more complicated, and the chance increases that you are not balancing the I/O equally over all available drives. If the I/O is not balanced, you will reach the point of suboptimal performance very fast, because it is only the cost difference between random and sequential read that can be gained. Otherwise, you are probably better off striping over the available drives. At least for your general purpose data files. If you have sufficient I/O, then it is a good idea to create multiple files. The rule of thumb is to create one file for each CPU core that is available to SQL Server. That allows better parallellism. -- Gert-Jan RG wrote: Are you saying that in sql server it is better to have, as an example, 2 db files on two separate physical drives rather than having one db file on raid drive which is striped across 2 physical drives? "Jay Konigsberg" <spam (AT) nospam (DOT) org> wrote in message news:eOO6Kv$vKHA.4752 (AT) TK2MSFTNGP04 (DOT) phx.gbl... A Quad core processor will count a 4 CPU's by SQL Server (kinda cool huh). I'm not sure what you mean by multiplex, but striping will not gain you anything from the multi-threading perspective. If you can put tables being joined on different drives, or even better, partition them across different drives, then the Query Optimizer can run more threads on your query and spread the I/O out even further. Perhaps this is what you mean by multiplex? -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "RG" <nobody (AT) nowhere (DOT) com> wrote in message news:B89C58DE-F69C-4623-AF5A-AEF2D6F17306 (AT) microsoft (DOT) com... Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#9
| |||
| |||
|
|
Are you saying that in sql server it is better to have, as an example, 2 db files on two separate physical drives rather than having one db file on raid drive which is striped across 2 physical drives? "Jay Konigsberg" <spam (AT) nospam (DOT) org> wrote in message news:eOO6Kv$vKHA.4752 (AT) TK2MSFTNGP04 (DOT) phx.gbl... A Quad core processor will count a 4 CPU's by SQL Server (kinda cool huh). I'm not sure what you mean by multiplex, but striping will not gain you anything from the multi-threading perspective. If you can put tables being joined on different drives, or even better, partition them across different drives, then the Query Optimizer can run more threads on your query and spread the I/O out even further. Perhaps this is what you mean by multiplex? -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "RG" <nobody (AT) nowhere (DOT) com> wrote in message news:B89C58DE-F69C-4623-AF5A-AEF2D6F17306 (AT) microsoft (DOT) com... Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#10
| |||
| |||
|
|
If you have sufficient I/O, then it is a good idea to create multiple files. The rule of thumb is to create one file for each CPU core that is available to SQL Server. That allows better parallelism. Unless you partition the file across multiple drives where a query will only be accessing data on a particular partition. Then making more partitions than the number of CPU's also makes sense. However, partitioning is probably out of the OP's scope. -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "Gert-Jan Strik" <sorrytoomuchspamalready (AT) xs4all (DOT) nl> wrote in message news:4B97EC60.6B82D4B4 (AT) xs4all (DOT) nl... RG, It depends. Specifically what you want to optimize. If there is one big query (OLAP type scenario) that trumps the importance of all other queries, and you are running in single user mode, and the query selects from two table (for example with a Merge Join or Hash Join) where the tables are about the same size, then two files on two separate drives, each with one of the tables would be the ideal situation, because each drive would work separately and can maximize sequential reads. If any of the "ifs" is not present, the situation gets more complicated, and the chance increases that you are not balancing the I/O equally over all available drives. If the I/O is not balanced, you will reach the point of suboptimal performance very fast, because it is only the cost difference between random and sequential read that can be gained. Otherwise, you are probably better off striping over the available drives. At least for your general purpose data files. If you have sufficient I/O, then it is a good idea to create multiple files. The rule of thumb is to create one file for each CPU core that is available to SQL Server. That allows better parallellism. -- Gert-Jan RG wrote: Are you saying that in sql server it is better to have, as an example, 2 db files on two separate physical drives rather than having one db file on raid drive which is striped across 2 physical drives? "Jay Konigsberg" <spam (AT) nospam (DOT) org> wrote in message news:eOO6Kv$vKHA.4752 (AT) TK2MSFTNGP04 (DOT) phx.gbl... A Quad core processor will count a 4 CPU's by SQL Server (kinda cool huh). I'm not sure what you mean by multiplex, but striping will not gain you anything from the multi-threading perspective. If you can put tables being joined on different drives, or even better, partition them across different drives, then the Query Optimizer can run more threads on your query and spread the I/O out even further. Perhaps this is what you mean by multiplex? -- Jay Konigsberg SQL Server DBA in Sacramento, CA http://www.linkedin.com/in/jaykonigsberg Live in Sacramento, CA? Join the Sacramento SQL Server User Group on LinkedIn http://www.linkedin.com/groups?home=...oback=%2E myg "RG" <nobody (AT) nowhere (DOT) com> wrote in message news:B89C58DE-F69C-4623-AF5A-AEF2D6F17306 (AT) microsoft (DOT) com... Do you mean physical or in case of quad core, it woudl be 4 processors? Are you saying you don't even need to multiplex the drives or have drives striped? If so, wouldn't be a bottle neck. Thanks again "Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message news:Xns9D37983D61BYazorman (AT) 127 (DOT) 0.0.1... RG (RG (AT) discussions (DOT) microsoft.com) writes: Is there guidelines, suggestion or could somebody point me to articles which discuss how to determine the optimum degree of parallelism? I suppose the biggest factor is going to be cxpacket waits. My problem is how do I determine when cxpacket waits exceed the treshold. It depends largely on what kind of system you have. Many claim that for a pure OLTP system the optimal number is 1. For an OLAP system, the number might be 0, that is use all processors. I think the most decisive is not the CXPACKET waits, but how many CPU:s you want to give to a single user. A perfectly parallel query, with no CXPACKET waits that runs over all processors is on fun the other users of the system. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |