2010YOUY01 commented on PR #16889:
URL: https://github.com/apache/datafusion/pull/16889#issuecomment-3121126110

   > I'll need some time to read through the code, but reduced memory usage is 
also impressive 👍
   > 
   > * v1 (old)
   > 
   > ```
   > Query     Time (ms)     Peak RSS  Peak Commit  Page Faults
   > --------------------------------------------------------------
   > 1            657.40    1112.0 MB      10.6 GB            0
   > 2            833.66    1691.1 MB      10.6 GB            0
   > 3           1688.13       3.4 GB      10.8 GB            0
   > 4           4176.38      16.2 GB      20.1 GB            0
   > 5           1629.22      23.2 GB      57.2 GB            0
   > 6          17687.00      18.9 GB      26.1 GB            0
   > 7           1245.64      23.3 GB      39.2 GB            0
   > 8          19420.73      20.1 GB      31.3 GB            0
   > 9           3467.28      10.4 GB      19.9 GB            0
   > 10          5414.65      44.7 GB      46.0 GB            0
   > ```
   > 
   > * v2 (nlj-rewrite-tmp)
   > 
   > ```
   > Query     Time (ms)     Peak RSS  Peak Commit  Page Faults
   > --------------------------------------------------------------
   > 1            383.61     104.4 MB       5.0 GB            0
   > 2            645.60     471.2 MB       8.0 GB            0
   > 3            763.10    1738.5 MB       6.0 GB            0
   > 4           1973.21       5.9 GB       9.6 GB            0
   > 5            644.86     145.1 MB       4.0 GB            0
   > 6           6043.58     149.3 MB       2.0 GB            0
   > 7            543.70     154.5 MB       7.0 GB            0
   > 8           6516.91     177.4 MB       4.0 GB            0
   > 9           1571.97     140.4 MB       6.0 GB            0
   > 10          3098.54      22.8 GB      26.9 GB            0
   > ```
   > 
   > I ran `cargo run --profile release-nonlto --bin mem_profile nlj` in 
https://github.com/ding-young/datafusion/tree/nlj-rewrite-tmp-review and 
adjusted v1/v2 with `static USE_NLJ_V2: bool = false;`
   
   Thanks for the profiler 👍🏼  I'll review that soon.
   
   I think Q4 and Q10 should not consume that much memory 😅
   ```sql
   -- q10:
   SELECT *
           FROM range(30000) AS t1
           FULL JOIN range(30000) AS t2
           ON (t1.value + t2.value) % 10 <> 0;
   ```
   It is supposed to only buffer (30k x 8Bytes), 20G RSS is not expected.
   let me double check the implementation...


-- 
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: github-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to