[GitHub] [carbondata] MarvinLitt opened a new pull request #3518: [DOC] add performance-tuning with codegen parameters support

classic Classic list List threaded Threaded
37 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] MarvinLitt opened a new pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
MarvinLitt opened a new pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518
 
 
   Be sure to do all of the following checklist to help us incorporate
   your contribution quickly and easily:
   
    - [ ] Any interfaces changed?
   
    - [ ] Any backward compatibility impacted?
   
    - [ ] Document update required?
   
    - [ ] Testing done
           Please provide details on
           - Whether new unit test cases have been added or why no new tests are required?
           - How it is tested? Please attach test report.
           - Is it a performance related change? Please attach the performance test report.
           - Any additional information to help reviewers in testing this change.
         
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
jackylk commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r361096657
 
 

 ##########
 File path: docs/performance-tuning.md
 ##########
 @@ -173,6 +173,8 @@
 | carbon.sort.temp.compressor | spark/carbonlib/carbon.properties | Data loading | Specify the name of compressor to compress the intermediate sort temporary files during sort procedure in data loading. | The optional values are 'SNAPPY','GZIP','BZIP2','LZ4','ZSTD', and empty. Specially, empty means that Carbondata will not compress the sort temp files. This parameter will be useful if you encounter disk bottleneck. |
 | carbon.load.skewedDataOptimization.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable size based block allocation strategy for data loading. | When loading, carbondata will use file size based block allocation strategy for task distribution. It will make sure that all the executors process the same size of data -- It's useful if the size of your input data files varies widely, say 1MB to 1GB. |
 | carbon.load.min.size.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable node minumun input data size allocation strategy for data loading.| When loading, carbondata will use node minumun input data size allocation strategy for task distribution. It will make sure the nodes load the minimum amount of data -- It's useful if the size of your input data files very small, say 1MB to 256MB,Avoid generating a large number of small files. |
+| spark.sql.codegen.wholeStage | spark/conf/spark-defaults.conf | Querying | improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data. | The whole stage CodeGen mechanism introduced by spark SQL in version 2. X causes. This configuration is recommended to be off at spark 2.1 and on at spark 2.3. Because under spark2.1 user can only use spark.sql.codegen.wholeStage to control whether to use codegen, but can not config the  size of the method. In fact, this parameter should be configured to be the same as the local JDK. Under spark2.3 support spark.sql.codegen.hugeMethodLimit  use can use that to config the method size. |
 
 Review comment:
   This is spark configuration, suggest not to add in carbon's document. Or maybe you can add a link in the bottom of this section to point to the performance tuning page of spark community

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r361905323
 
 

 ##########
 File path: docs/performance-tuning.md
 ##########
 @@ -173,6 +173,8 @@
 | carbon.sort.temp.compressor | spark/carbonlib/carbon.properties | Data loading | Specify the name of compressor to compress the intermediate sort temporary files during sort procedure in data loading. | The optional values are 'SNAPPY','GZIP','BZIP2','LZ4','ZSTD', and empty. Specially, empty means that Carbondata will not compress the sort temp files. This parameter will be useful if you encounter disk bottleneck. |
 | carbon.load.skewedDataOptimization.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable size based block allocation strategy for data loading. | When loading, carbondata will use file size based block allocation strategy for task distribution. It will make sure that all the executors process the same size of data -- It's useful if the size of your input data files varies widely, say 1MB to 1GB. |
 | carbon.load.min.size.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable node minumun input data size allocation strategy for data loading.| When loading, carbondata will use node minumun input data size allocation strategy for task distribution. It will make sure the nodes load the minimum amount of data -- It's useful if the size of your input data files very small, say 1MB to 256MB,Avoid generating a large number of small files. |
+| spark.sql.codegen.wholeStage | spark/conf/spark-defaults.conf | Querying | improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data. | The whole stage CodeGen mechanism introduced by spark SQL in version 2. X causes. This configuration is recommended to be off at spark 2.1 and on at spark 2.3. Because under spark2.1 user can only use spark.sql.codegen.wholeStage to control whether to use codegen, but can not config the  size of the method. In fact, this parameter should be configured to be the same as the local JDK. Under spark2.3 support spark.sql.codegen.hugeMethodLimit  use can use that to config the method size. |
 
 Review comment:
   Some spark configurations are helpful for query performance improvement.
   Can we add a chapter in FAQ or an MD file to record these parameters?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r362229446
 
 

 ##########
 File path: docs/performance-tuning.md
 ##########
 @@ -173,6 +173,8 @@
 | carbon.sort.temp.compressor | spark/carbonlib/carbon.properties | Data loading | Specify the name of compressor to compress the intermediate sort temporary files during sort procedure in data loading. | The optional values are 'SNAPPY','GZIP','BZIP2','LZ4','ZSTD', and empty. Specially, empty means that Carbondata will not compress the sort temp files. This parameter will be useful if you encounter disk bottleneck. |
 | carbon.load.skewedDataOptimization.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable size based block allocation strategy for data loading. | When loading, carbondata will use file size based block allocation strategy for task distribution. It will make sure that all the executors process the same size of data -- It's useful if the size of your input data files varies widely, say 1MB to 1GB. |
 | carbon.load.min.size.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable node minumun input data size allocation strategy for data loading.| When loading, carbondata will use node minumun input data size allocation strategy for task distribution. It will make sure the nodes load the minimum amount of data -- It's useful if the size of your input data files very small, say 1MB to 256MB,Avoid generating a large number of small files. |
+| spark.sql.codegen.wholeStage | spark/conf/spark-defaults.conf | Querying | improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data. | The whole stage CodeGen mechanism introduced by spark SQL in version 2. X causes. This configuration is recommended to be off at spark 2.1 and on at spark 2.3. Because under spark2.1 user can only use spark.sql.codegen.wholeStage to control whether to use codegen, but can not config the  size of the method. In fact, this parameter should be configured to be the same as the local JDK. Under spark2.3 support spark.sql.codegen.hugeMethodLimit  use can use that to config the method size. |
 
 Review comment:
   i has move spark sql codegen optimization guid line to a new md file named query-with-spark-sql-performacne-tuning. please check.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#issuecomment-569944042
 
 
   Build Success with Spark 2.1.0, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.1/1381/
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#issuecomment-569951199
 
 
   Build Failed with Spark 2.2.1, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.2/1391/
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on issue #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
CarbonDataQA1 commented on issue #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#issuecomment-569952924
 
 
   Build Failed  with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1403/
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364031756
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
 
 Review comment:
   please check Markdown format, this line can not jump to the details

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364032535
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
 
 Review comment:
   could be `the number of columns applied SUM operator`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364032914
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
 
 Review comment:
   why not put this as title of axis in the figure?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364034477
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
+
+It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased.
+
+After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html)
 
 Review comment:
   - use `` to quote that spark parameter
   - which is enabled by default *since*
   - can you make the title of link shorter?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364035070
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
 
 Review comment:
   you can define a name like "counter" to express the meaning of columns applied SUM operator, and following context can reuse it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364035759
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
+
+It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased.
+
+After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html)
+
+**Whole-Stage Java Code Generation** (aka *Whole-Stage CodeGen*) is a physical query optimization in Spark SQL that fuses multiple physical operators (as a subtree of plans that [support code generation](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-CodegenSupport.html)) together into a single Java function.
+
+Whole-Stage Java Code Generation improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data.
+
+When sum is too large, the logic calculation function of hashaggregate operator is too large (there are nearly 3000 lines of code when there are 34 indicators). Java itself does not recommend too large methods, which will reduce the processing efficiency, and exceed the JIT threshold, making the final execution in the way of interpretation. When the carbon grows in the counter, the performance drops sharply.
 
 Review comment:
   - these concepts are not clear : sum, indicator, counter
   - ` When the carbon grows in the counter` -> should be the query, not carbon

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364036194
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
+
+It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased.
+
+After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html)
+
+**Whole-Stage Java Code Generation** (aka *Whole-Stage CodeGen*) is a physical query optimization in Spark SQL that fuses multiple physical operators (as a subtree of plans that [support code generation](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-CodegenSupport.html)) together into a single Java function.
+
+Whole-Stage Java Code Generation improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data.
+
+When sum is too large, the logic calculation function of hashaggregate operator is too large (there are nearly 3000 lines of code when there are 34 indicators). Java itself does not recommend too large methods, which will reduce the processing efficiency, and exceed the JIT threshold, making the final execution in the way of interpretation. When the carbon grows in the counter, the performance drops sharply.
+
+But unfortunately, spark 2.1 only provides switching capability. User can only choose to turn the function on or off. This leads to a sharp drop in performance when the aggregation operator is too large.
+
+Fortunately, spark 2.3 provide more configuration. Users can better configure this parameter.
 
 Review comment:
   what is the `more`? Show it here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
kevinjmh commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364037040
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
+
+It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased.
+
+After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html)
+
+**Whole-Stage Java Code Generation** (aka *Whole-Stage CodeGen*) is a physical query optimization in Spark SQL that fuses multiple physical operators (as a subtree of plans that [support code generation](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-CodegenSupport.html)) together into a single Java function.
+
+Whole-Stage Java Code Generation improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data.
+
+When sum is too large, the logic calculation function of hashaggregate operator is too large (there are nearly 3000 lines of code when there are 34 indicators). Java itself does not recommend too large methods, which will reduce the processing efficiency, and exceed the JIT threshold, making the final execution in the way of interpretation. When the carbon grows in the counter, the performance drops sharply.
+
+But unfortunately, spark 2.1 only provides switching capability. User can only choose to turn the function on or off. This leads to a sharp drop in performance when the aggregation operator is too large.
+
+Fortunately, spark 2.3 provide more configuration. Users can better configure this parameter.
+
+So in spark 2.1, when the number of operators cannot be confirmed, spark.sql.codegen.wholeStage can be turned off to ensure the query efficiency. when in spark 2.3 and above users can open spark.sql.codegen.wholeStage  and configure it.  
 
 Review comment:
   Line 57 also talking about configuration for spark 2.1, but the meaning is different. Better to unify them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] chetandb commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
chetandb commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364117339
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
 
 Review comment:
   Check spelling of performacne . Change to performance.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] chetandb commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
chetandb commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364117878
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
+
+It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased.
+
+After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html)
 
 Review comment:
   Change spelling of catalist to catalyst

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] chetandb commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
chetandb commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364118892
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
+
+![File Directory Structure](../docs/images/codegen.png?raw=true)
+
+The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds.
+
+It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased.
+
+After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html)
+
+**Whole-Stage Java Code Generation** (aka *Whole-Stage CodeGen*) is a physical query optimization in Spark SQL that fuses multiple physical operators (as a subtree of plans that [support code generation](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-CodegenSupport.html)) together into a single Java function.
+
+Whole-Stage Java Code Generation improves the execution performance of a query by collapsing a query tree into a single optimized function that eliminates virtual function calls and leverages CPU registers for intermediate data.
+
+When sum is too large, the logic calculation function of hashaggregate operator is too large (there are nearly 3000 lines of code when there are 34 indicators). Java itself does not recommend too large methods, which will reduce the processing efficiency, and exceed the JIT threshold, making the final execution in the way of interpretation. When the carbon grows in the counter, the performance drops sharply.
 
 Review comment:
   "When the carbon grows in the counter, the performance drops sharply." - This point is not clear. Might need to be rephrased.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364193833
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
 
 Review comment:
   manhua,need press ctrl then can jump to the details.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support

GitBox
In reply to this post by GitBox
MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support
URL: https://github.com/apache/carbondata/pull/3518#discussion_r364196990
 
 

 ##########
 File path: docs/query-with-spark-sql-performacne-tuning.md
 ##########
 @@ -0,0 +1,58 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to you under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+# Query with spark-sql performacne tuning
+  This tutorial guides you to create CarbonData Tables and optimize performance.
+  The following sections will elaborate on the below topics :
+
+  * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query)
+
+## The influence of spark.sql.codegen.wholeStage configuration on query
+
+In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1):
 
 Review comment:
   okay,done

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
12