On Thu, 25 Mar 2021 23:28:18 GMT, Erik Gahlin <egah...@openjdk.org> wrote:

> Does each getter call result in parsing /proc, or do things aggregated over 
> several calls or hooks?

>From the looks of it the event emitting code uses `Metrics.java` interface for 
>retrieving the info. Each call to a method exposed by Metrics result in file 
>IO on some cgroup (v1 or v2) interface file(s) in `/sys/fs/...`. I don't see 
>any aggregation being done.

On the hotspot side, we implemented some caching for frequent calls 
(JDK-8232207, JDK-8227006), but we didn't do that yet for the Java side since 
there wasn't any need (so far). If calls are becoming frequent with this it 
should be reconsidered.

So +1 on getting some data on what the perf penalty of this is.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3126

Reply via email to