Back to articles
Using RSS to Understand Memory Pressure in CI Builds
How-ToSystems

Using RSS to Understand Memory Pressure in CI Builds

via Dev.toIñaki Villar

Once in a while, you may have wondered why builds running on CI agents can still hit OOM errors, even on machines with large amounts of memory. For example, how is it possible to hit an OOM on a 32 GB machine even after setting a 16 GB heap? The first and most immediate answer is that the value configured via jvmargs in gradle.properties applies only to the heap of the Gradle process. From the operating system’s point of view, a JVM process is composed of more than just the heap. Several additional components contribute to the total memory footprint, and these are often overlooked when sizing CI agents or tuning memory limits: Metaspace Code cache Thread stacks Direct buffers GC native memory Native / OS memory All of these are grouped under the RSS (Resident Set Size) of the Java process on Unix-like systems. Another important reason is that the Gradle process is not the only JVM involved in a build. We also have the Kotlin daemon, test JVMs, and in Android builds, additional isolated

Continue reading on Dev.to

Opens in a new tab

Read Full Article
7 views

Related Articles