Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Measure cache misses in JVM

Is it possible to measure cache misses in a running JVM?

Even better, is there a way to get these metrics in JProfiler? Or any other profiler?

I have explored JProfiler options and haven't seen an inspection for this.

like image 626
Synesso Avatar asked Jun 27 '16 07:06

Synesso


People also ask

How do you count cache misses?

You can also calculate a miss ratio by dividing the number of misses with the total number of content requests. For example, if you look over a period of time and find that the misses your cache experienced was11, and the total number of content requests was 48, you would divide 11 by 48 to get a miss ratio of 0.229.

What is cache miss in Java?

What Is a Cache Miss? A cache miss is an event in which a system or application makes a request to retrieve data from a cache, but that specific data is not currently in cache memory. Contrast this to a cache hit, in which the requested data is successfully retrieved from the cache.


1 Answers

On linux you can use perf-map-agent which provides java integration for perf-tools.

async-profiler is another tool supporting perf events.

like image 141
the8472 Avatar answered Oct 19 '22 09:10

the8472