You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "wForget (via GitHub)" <gi...@apache.org> on 2025/06/18 03:59:36 UTC

[PR] [GLUTEN-9994][VL] Log velox memory usage stats when VeloxMemoryManager is shrinking [incubator-gluten]

wForget opened a new pull request, #10000:
URL: https://github.com/apache/incubator-gluten/pull/10000

   ## What changes were proposed in this pull request?
   
   Log velox memory usage stats when VeloxMemoryManager is shrinking
   
   Fixes: #9994
   
   ## How was this patch tested?
   
   after this:
   
   ```
   I20250618 11:53:51.678433 586584 VeloxMemoryManager.cc:266] Shrink[root/root]: Trying to shrink 32715569 bytes of data...
   I20250618 11:53:51.678506 586584 VeloxMemoryManager.cc:267] Shrink[root/root]: Pool has reserved 1342701568/1409286144/1409286144/9223372036854775807 bytes.
   I20250618 11:53:51.678520 586584 VeloxMemoryManager.cc:269] Shrink[root/root]: Velox memory usage stats...
   I20250618 11:53:51.678632 586584 VeloxMemoryManager.cc:253] Shrink[root/root]: +- root/root (usedBytes: 1.25GB,peakBytes: 1.31GB)
   I20250618 11:53:51.678680 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:    +- task.Gluten_Stage_5_TID_9347_VTID_9 (usedBytes: 1.25GB,peakBytes: 1.31GB)
   I20250618 11:53:51.678697 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.3 (usedBytes: 1.25GB,peakBytes: 1.31GB)
   I20250618 11:53:51.678706 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.3.1.0.HashBuild (usedBytes: 1.25GB,peakBytes: 1.25GB)
   I20250618 11:53:51.678715 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.3.0.0.HashProbe (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678732 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.2 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678741 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.2.1.0.ValueStream (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678750 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.0 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678767 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.0.0.0.ValueStream (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678781 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.4 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678793 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.4.0.0.FilterProject (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678807 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.5 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678821 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.5.0.0.FilterProject (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678835 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.8 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678844 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.8.0.0.FilterProject (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678853 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.6 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678862 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.6.0.0.FilterProject (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678871 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.1 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678879 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.1.0.0.Aggregation (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678889 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:       +- node.7 (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678897 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:          +- op.7.0.0.OrderBy (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678908 586584 VeloxMemoryManager.cc:253] Shrink[root/root]:    +- default_leaf (usedBytes: 0B,peakBytes: 0B)
   I20250618 11:53:51.678923 586584 VeloxMemoryManager.cc:273] Shrink[root/root]: Shrinking...
   I20250618 11:53:51.678939 586584 VeloxMemoryManager.cc:278] Shrink[root/root]: 0 bytes released from shrinking.
   ```
   


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

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


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


Re: [PR] [GLUTEN-9994][VL] Log velox memory usage stats when VeloxMemoryManager is shrinking [incubator-gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on PR #10000:
URL: https://github.com/apache/incubator-gluten/pull/10000#issuecomment-2987341827

   Thanks, merged to main


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

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


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


Re: [PR] [GLUTEN-9994][VL] Log velox memory usage stats when VeloxMemoryManager is shrinking [incubator-gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget merged PR #10000:
URL: https://github.com/apache/incubator-gluten/pull/10000


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

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


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


Re: [PR] [GLUTEN-9994][VL] Log velox memory usage stats when VeloxMemoryManager is shrinking [incubator-gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on code in PR #10000:
URL: https://github.com/apache/incubator-gluten/pull/10000#discussion_r2156590910


##########
cpp/velox/memory/VeloxMemoryManager.cc:
##########
@@ -294,12 +294,27 @@ MemoryUsageStats collectGlutenAllocatorMemoryUsageStats(
   return stats;
 }
 
+void logMemoryUsageStats(MemoryUsageStats stats, const std::string& name, const std::string& logPrefix) {
+  VLOG(2) << logPrefix << "+- " << name

Review Comment:
   > I just found every loop will print a log, could we pass a `stringstream` ref to collect all usage stats and call `.str()` outside the loop?
   
   Thanks, I will make a follow-up PR to improve 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: commits-unsubscribe@gluten.apache.org

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


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


Re: [PR] [GLUTEN-9994][VL] Log velox memory usage stats when VeloxMemoryManager is shrinking [incubator-gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10000:
URL: https://github.com/apache/incubator-gluten/pull/10000#issuecomment-2982591414

   https://github.com/apache/incubator-gluten/issues/9994


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

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


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


Re: [PR] [GLUTEN-9994][VL] Log velox memory usage stats when VeloxMemoryManager is shrinking [incubator-gluten]

Posted by "Yohahaha (via GitHub)" <gi...@apache.org>.
Yohahaha commented on code in PR #10000:
URL: https://github.com/apache/incubator-gluten/pull/10000#discussion_r2156567040


##########
cpp/velox/memory/VeloxMemoryManager.cc:
##########
@@ -294,12 +294,27 @@ MemoryUsageStats collectGlutenAllocatorMemoryUsageStats(
   return stats;
 }
 
+void logMemoryUsageStats(MemoryUsageStats stats, const std::string& name, const std::string& logPrefix) {
+  VLOG(2) << logPrefix << "+- " << name

Review Comment:
   I just found every loop will print a log, could we pass a `stringstream` ref to collect all usage stats and call `.str()` outside the loop?



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

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


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