nevdmitry commented on code in PR #7139:
URL: https://github.com/apache/ignite-3/pull/7139#discussion_r2585332218


##########
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteServerImpl.java:
##########
@@ -527,6 +541,48 @@ private static void logVmInfo() {
         );
     }
 
+    private static void logAvailableVmMemory() {
+        MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
+        MemoryUsage heapMemoryUsage = memoryBean.getHeapMemoryUsage();
+        MemoryUsage nonHeapMemoryUsage = memoryBean.getNonHeapMemoryUsage();
+
+        LOG.info(
+                "VM Memory Configuration: heap [init={}, max={}], non-heap 
[init={}, max={}]",
+                toHumanReadableMemoryString(heapMemoryUsage.getInit()),
+                toHumanReadableMemoryString(heapMemoryUsage.getMax()),
+                toHumanReadableMemoryString(nonHeapMemoryUsage.getInit()),
+                toHumanReadableMemoryString(nonHeapMemoryUsage.getMax())
+        );
+    }
+
+    private static void logJvmArguments() {
+        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+        List<String> jvmArgs = runtimeMxBean.getInputArguments();
+
+        LOG.info("VM arguments: {}", String.join(" ", jvmArgs));
+    }
+
+    private static String toHumanReadableMemoryString(long bytes) {

Review Comment:
   Let's use `toHumanReadableMemoryString` for Max heap as well



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to