Class RuntimeMemory

java.lang.Object
com.illumon.iris.db.v2.utils.RuntimeMemory

public class RuntimeMemory
extends Object
Cache memory utilization.

Calling Runtime.getRuntime().getFreeMemory() is expensive; and we may do it a lot when we have automatically computed tables, such as in a byExternal. Instead of calling the runtime directly from the performance instrumentation framework, we call this class's methods; which cache the result for a configurable number of milliseconds to avoid repeated calls that are not likely any different.

Additionally, we log our JVM heap usage on a regular basis; to enable users to quickly examine their worker logs and understand memory issues.