You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/12/03 13:20:41 UTC

[GitHub] [incubator-doris] GoGoWen opened a new pull request #7293: improve memory usage for broker load

GoGoWen opened a new pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293


   ## Proposed changes
   
   the PR going to fix #7292 .
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [x] Optimization. Including functional usability improvements and performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x ] I have created an issue on (Fix #7292) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293#issuecomment-988904659


   > better to do a test to see the performance decrease than before.
   
   Yes, would you like to make a simple test for this case?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293#issuecomment-1001143335


   Fix in #7454, close this PR.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] GoGoWen commented on pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
GoGoWen commented on pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293#issuecomment-998676375


   @morningman   after test, seems this pr will cause performance decrease heavy,  i will submit another pr to find a better fix for this.  below is the test  result.
   cluster info:  1FE 3BE,  
   data info: file type: parquet,  file size: 900M,  file num: 64
   load type: broker load from hdfs
   schema: CREATE TABLE `test_table` (
     `pin_id` bigint(20) NOT NULL COMMENT "",
     `date_time` datetime NOT NULL COMMENT "",
     `cart_day` datetime NOT NULL COMMENT "",
     `campaign_id` bigint(20) NOT NULL COMMENT "",
     `group_id` bigint(20) NOT NULL COMMENT "",
     `ad_id` bigint(20) NOT NULL COMMENT "",
     `date` date NOT NULL COMMENT "",
     `cart_date` date NOT NULL COMMENT "",
     `mobile_type` int(11) NOT NULL COMMENT "",
     `dmp_id` bigint(20) NOT NULL COMMENT "",
     `ad_traffic_group` int(11) NOT NULL COMMENT "",
     `area_id` int(11) NOT NULL COMMENT "",
     `pos_id` bigint(20) NOT NULL COMMENT "",
     `pos_group_id` bigint(20) NOT NULL COMMENT "",
     `ad_business_type` int(11) NOT NULL COMMENT "",
     `ad_billing_type` int(11) NOT NULL COMMENT "",
     `loc` int(11) NOT NULL COMMENT "",
     `retrieval_type` int(11) NOT NULL COMMENT "",
     `ad_sku_id` bigint(20) NOT NULL COMMENT "",
     `ad_sku_brand_id` bigint(20) NOT NULL COMMENT "",
     `ad_sku_cid3_id` int(11) NOT NULL COMMENT "",
     `ad_type` int(11) NOT NULL COMMENT "",
     `targeting_type` int(11) NOT NULL COMMENT "",
     `hit_key` varchar(384) NOT NULL COMMENT "",
     `search_word` varchar(2000) NULL COMMENT "",
     `search_promote_rank` bigint(20) NOT NULL COMMENT "",
     `automated_bidding_type` bigint(20) NOT NULL COMMENT "",
     `activity_pin` varchar(153) NOT NULL COMMENT "",
     `activity_pin_id` bigint(20) NOT NULL COMMENT "",
     `activity_campaignid` bigint(20) NOT NULL COMMENT "",
     `activity_adgroupid` bigint(20) NOT NULL COMMENT "",
     `activity_adid` bigint(20) NOT NULL COMMENT "",
     `activity_id` int(11) NOT NULL COMMENT "",
     `campaign_type` int(11) NOT NULL COMMENT "",
     `tcpa_phase` bigint(20) NOT NULL COMMENT "",
     `dmp_crowd_ids` varchar(512) NOT NULL COMMENT "",
     `new_arrival_type` int(11) NOT NULL COMMENT "",
     `adv_id` varchar(32) NOT NULL COMMENT "",
     `narwal_table_id` int(11) NOT NULL COMMENT "",
     `activity_type` int(11) NOT NULL COMMENT "",
     `landing_page_type` int(11) NOT NULL COMMENT "",
     `promote_rank` int(11) NOT NULL COMMENT "",
     `pos_package_id` bigint(20) NOT NULL COMMENT "",
     `userpin` varchar(153) NOT NULL COMMENT "",
     `delivery_type` int(11) NOT NULL DEFAULT "0" COMMENT "",
     `product_delivery_matching_type` int(11) NOT NULL DEFAULT "0" COMMENT "",
     `product_delivery_matching_id` bigint(20) NOT NULL DEFAULT "0" COMMENT "",
     `product_delivery_trigger_sku_id` bigint(20) NOT NULL DEFAULT "0" COMMENT "",
     `parent_activity_id` bigint(20) NOT NULL DEFAULT "0" COMMENT "",
     `branding_order_id` bigint(20) NOT NULL DEFAULT "0" COMMENT "",
     `sku_premium_type` int(11) NOT NULL DEFAULT "0" COMMENT "",
     `deal_id` bigint(20) NOT NULL DEFAULT "0" COMMENT "",
     `selection_rule_bitmap` bigint(20) NOT NULL DEFAULT "0" COMMENT "",
     `coupon_flag` int(11) NULL COMMENT "",
     `strategy_id` bigint(20) NULL COMMENT "",
     `strategy_type` int(11) NULL COMMENT "",
     `opt_scenario_type` int(11) NULL COMMENT "",
     `docnt` bigint(20) SUM NULL DEFAULT "0" COMMENT "直接加购数",
     `idocnt` bigint(20) SUM NULL DEFAULT "0" COMMENT "间接加购数",
     `rocnt` bigint(20) SUM NULL DEFAULT "0" COMMENT "影响加购数"
   ) ENGINE=OLAP
   AGGREGATE KEY(`pin_id`, `date_time`, `cart_day`, `campaign_id`, `group_id`, `ad_id`, `date`, `cart_date`, `mobile_type`, `dmp_id`, `ad_traffic_group`, `area_id`, `pos_id`, `pos_group_id`, `ad_business_type`, `ad_billing_type`, `loc`, `retrieval_type`, `ad_sku_id`, `ad_sku_brand_id`, `ad_sku_cid3_id`, `ad_type`, `targeting_type`, `hit_key`, `search_word`, `search_promote_rank`, `automated_bidding_type`, `activity_pin`, `activity_pin_id`, `activity_campaignid`, `activity_adgroupid`, `activity_adid`, `activity_id`, `campaign_type`, `tcpa_phase`, `dmp_crowd_ids`, `new_arrival_type`, `adv_id`, `narwal_table_id`, `activity_type`, `landing_page_type`, `promote_rank`, `pos_package_id`, `userpin`, `delivery_type`, `product_delivery_matching_type`, `product_delivery_matching_id`, `product_delivery_trigger_sku_id`, `parent_activity_id`, `branding_order_id`, `sku_premium_type`, `deal_id`, `selection_rule_bitmap`, `coupon_flag`, `strategy_id`, `strategy_type`, `opt_scenario_type`)
   COMMENT "OLAP"
   PARTITION BY RANGE(`cart_day`)
   (PARTITION pbefore202108 VALUES [('1900-01-01 00:00:00'), ('2021-08-01 00:00:00')),
   PARTITION p202108 VALUES [('2021-08-01 00:00:00'), ('2021-09-01 00:00:00')),
   PARTITION p202109 VALUES [('2021-09-01 00:00:00'), ('2021-10-01 00:00:00')),
   PARTITION p202110 VALUES [('2021-10-01 00:00:00'), ('2021-11-01 00:00:00')),
   PARTITION p202111 VALUES [('2021-11-01 00:00:00'), ('2021-12-01 00:00:00')),
   PARTITION p202112 VALUES [('2021-12-01 00:00:00'), ('2022-01-01 00:00:00')))
   DISTRIBUTED BY HASH(`pin_id`) BUCKETS 16
   PROPERTIES (
   "replication_num" = "3",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   
   cost time before fix: 7m16s
   cost time after fix:18m50s
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] GoGoWen commented on pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
GoGoWen commented on pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293#issuecomment-989735008


   
   > > better to do a test to see the performance decrease than before.
   > 
   > Yes, would you like to make a simple test for this case?
   
   sure, i will test this and give report later


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman closed pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
morningman closed pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293#issuecomment-987983756


   I got your point. But after this, we have to call `tuple_pool.acquire_data()` for every single line. So that it will impact all
   normal loading process.
   I think we need to think twice to find a better way..


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] GoGoWen commented on pull request #7293: improve memory usage for broker load

Posted by GitBox <gi...@apache.org>.
GoGoWen commented on pull request #7293:
URL: https://github.com/apache/incubator-doris/pull/7293#issuecomment-988695679


   > I got your point. But after this, we have to call `tuple_pool.acquire_data()` for every single line. So that it will impact all normal loading process. I think we need to think twice to find a better way..
   
   thanks for your reply,  Yes we have to call "tuple_pool.acquire_data()" for every single line,  but seem it's no heavy as it just move chunk info do not allocate/free memory.   better to do a test to see the performance decrease than before. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org