This is an automated email from the ASF dual-hosted git repository.
yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new d561e5d9d83 Display current threshold for GC thrashing logs (#29768)
d561e5d9d83 is described below
commit d561e5d9d8356fb7f3eb7efe7e6c7eace50b306d
Author: Bruno Volpato <[email protected]>
AuthorDate: Thu May 2 11:23:25 2024 -0400
Display current threshold for GC thrashing logs (#29768)
---
.../org/apache/beam/runners/dataflow/worker/util/MemoryMonitor.java | 3 ++-
.../src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/MemoryMonitor.java
b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/MemoryMonitor.java
index f784deb60dd..83c49c19750 100644
---
a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/MemoryMonitor.java
+++
b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/MemoryMonitor.java
@@ -781,12 +781,13 @@ public class MemoryMonitor implements Runnable,
StatusDataProvider {
long totalMemory = runtime.totalMemory();
long usedMemory = totalMemory - runtime.freeMemory();
return String.format(
- "used/total/max = %d/%d/%d MB, GC last/max = %.2f/%.2f %%,
#pushbacks=%d, gc thrashing=%s",
+ "used/total/max = %d/%d/%d MB, GC last/max = %.2f/%.2f %% (configured
threshold: %.2f%%), #pushbacks=%d, gc thrashing=%s",
usedMemory >> 20,
totalMemory >> 20,
maxMemory >> 20,
lastMeasuredGCPercentage.get(),
maxGCPercentage.get(),
+ gcThrashingPercentagePerPeriod,
numPushbacks.get(),
isThrashing.get());
}
diff --git
a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java
index b1cc3a56ee9..cfd1ecb3cfa 100644
---
a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java
+++
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java
@@ -621,12 +621,13 @@ public class MemoryMonitor implements Runnable {
long totalMemory = runtime.totalMemory();
long usedMemory = totalMemory - runtime.freeMemory();
return String.format(
- "used/total/max = %d/%d/%d MB, GC last/max = %.2f/%.2f %%,
#pushbacks=%d, gc thrashing=%s",
+ "used/total/max = %d/%d/%d MB, GC last/max = %.2f/%.2f %% (configured
threshold: %.2f%%), #pushbacks=%d, gc thrashing=%s",
usedMemory >> 20,
totalMemory >> 20,
maxMemory >> 20,
lastMeasuredGCPercentage.get(),
maxGCPercentage.get(),
+ gcThrashingPercentagePerPeriod,
numPushbacks.get(),
isThrashing.get());
}