You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/06 18:14:46 UTC

[GitHub] [arrow-datafusion] viirya opened a new pull request #1933: Add debug log when waiting for spilling on other consumers

viirya opened a new pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933


   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #1932.
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] viirya commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820268587



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       I'm also thinking if it makes sense to measure the time spent on the wait and log 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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] houqp merged pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
houqp merged pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933


   


-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820316965



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       Yeah, that makes sense. 




-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820351229



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       For the longer time case, I suggest. 




-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] viirya commented on pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#issuecomment-1061316281


   Thanks @alamb @yjshen 


-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820319899



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       One more thought, based on your measure timing comments above, probably we could `warn!` if we've waited for a longer time than some threshold? In case reproducing the race would be hard. `debug!` at the first round might not be revealed in the first place? 




-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820316965



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       Yeah, that makes sense 




-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] viirya commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820318505



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       sounds good




-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] viirya commented on pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#issuecomment-1060026044


   cc @yjshen 


-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] viirya commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820322494



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       `warn!` sounds better. Do you think we need to have `warn!` for all log here? Or just for longer time 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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#discussion_r820317903



##########
File path: datafusion/src/execution/memory_manager.rs
##########
@@ -340,6 +340,9 @@ impl MemoryManager {
             } else if current < min_per_rqt {
                 // if we cannot acquire at lease 1/2n memory, just wait for others
                 // to spill instead spill self frequently with limited total mem
+                debug!(
+                    "Cannot acquire minimum amount of memory {}, waiting for others to spill ...",
+                    human_readable_size(min_per_rqt));

Review comment:
       How do you like to also log memory manager status as well? 
   ``` rust
   impl Display for MemoryManager {
       fn fmt(&self, f: &mut Formatter) -> fmt::Result {
           write!(f,
                  "MemoryManager usage statistics: total {}, trackers used {}, total {} requesters used: {}",
   ```




-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] viirya commented on pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#issuecomment-1061485103


   Thanks @alamb @yjshen @houqp !


-- 
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-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] houqp commented on pull request #1933: Add debug log when waiting for spilling on other consumers

Posted by GitBox <gi...@apache.org>.
houqp commented on pull request #1933:
URL: https://github.com/apache/arrow-datafusion/pull/1933#issuecomment-1061479213


   Thanks @viirya and @yjshen !


-- 
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-unsubscribe@arrow.apache.org

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