Skip to content
Advertisement

Tag: garbage-collection

Make ZGC run often

ZGC runs not often enough. GC logs show that it runs once every 2-3 minutes for my application and because of this, my memory usage goes high between GC cycles (as high as 90%). After GC, it drops to as low as 20%. How to increase GC run’s frequency to run more often? Answer -XX:ZCollectionInterval=N – set maximum gap between

Java object garbage collection

I am working on the OCA Java certification and unsure of how to understand the answer to one question. The question is which object will be available for garbage collection after the //HERE point. The answer provided by the online test is : One object (o1). Can someone explain me why? Answer Consider a simple class Student. Step 1 :

How to assert some Java method is garbage free?

I have a piece of code that (currently) use Java 8’s Optional and Stream. And we started having GC overhead issues since this code was deployed to production. See the gist of the code below (getters, constructors and overloads removed for clarity): While it could be unrelated, I’d like to make this code garbage free, especially since it’s a code

Where is the “age threshold” for the referenced object stored in Garbage Collection process stored?

I am trying to understand how GC works and have been reading https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html Garbage Collection Process, point #6 says, “After a minor GC, when aged objects reach a certain age threshold (8 in this example) they are promoted from young generation to old generation.” I am trying to understand where the “age threshold” for the referenced object stored? Answer This

What does “Other” mean in Java GC log?

I have such setup Java 11 Corretto inside Docker running on EC2 Java options: -Xms1200m -Xmx1200m -XX:+UseG1GC -Xlog:gc* In log I see that usually GC takes ~100-200ms, but for some timeslots, I see some weird behavior: [2074.114s][info][gc,phases ] GC(39) Other: 4082.5ms What does this “other” step mean? Answer This is most likely due to time spent writing the log out

why my JVM did 3 times of FullGC when it started

My job is a Flink TaskManager job. When it starts, it starts 3 times of GC. I don’t know why when it reached the MetadataGCThreshold it increased Tenured Space, while Metaspace didn’t change, and even increased between GCs. I thought FullGC would decrease Tenured Space, and some space of Metaspace. 😯 ================================================================= FollowUP thanks to Stephen’s answer, I set the

The cause of blocking GC Allocation problem when starting an Android application

I have recently encountered an unusual problem with Garbage Collecter allocation when beginning my application from Android Studio. My code compiles without errors and the program doesn’t throw any exceptions on Runtime. Nevertheless, when I start my program, it doesn’t respond. My Logcat shows: Then such logs appear repeatedly, till the program stops responding completely. As I read here and

Advertisement