Async-profiler: Big chunk of profiling data is missing

Created on 14 Jun 2018  路  5Comments  路  Source: jvm-profiling-tools/async-profiler

SVG: https://drive.google.com/file/d/1adU1EnPuUuiw-JKvcbvRkTprpEcGgVPK/view?usp=sharing
Could you please advice why the left part doesn't show any traces?

Version: async-profiler 1.3
There are no messages in the STDOUT.

OS

> ulimit -n
1024
> cat /proc/sys/vm/max_map_count
65530
> cat /proc/sys/kernel/perf_event_mlock_kb
6000
> cat /proc/sys/kernel/kptr_restrict
0
> cat /proc/sys/kernel/perf_event_paranoid
-1
> uname -a
Linux intellij-linux-hw-3 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Runtime:

JRE: 1.8.0_152-release-1248-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Most helpful comment

First of all, try to increase frame buffer size (-b option).

All 5 comments

Try summary output - it should print the reason of missed samples.
I'll add this to a flamegraph, too. Will be fixed in #123

First of all, try to increase frame buffer size (-b option).

I set frame buffer size to 100 million and it works indeed! Does it have any performance impact or some side effect?
I've decreased sampling rate to 10ms and it also helped so I would like to know which approach is better.

Thank you for the answers and the amazing tool!

Frame buffer size limits the maximum amount of memory used to store stack trace samples. Each frame takes 16 bytes, so a frame buffer of 100 million items may take up to 1.5 GB in RAM. This is probably too much, but fortunately the unused part of the buffer does not usually occupy physical RAM.

A choice of the sampling rate relates to the profiling duration. Typically 1 ms rate is OK for short profiling sessions (less than a minute). For longer profiling sessions I would suggest to decrease sampling rate.

I think I need to revise the defaults. Probably, 10 ms interval and 10 million buffer would be better for typical cases.

Added [frame_buffer_overflow] bar to the Flame Graph and changed the default profiling interval to 10ms.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franz1981 picture franz1981  路  8Comments

henryjcee picture henryjcee  路  5Comments

franz1981 picture franz1981  路  4Comments

apangin picture apangin  路  5Comments

aminebag picture aminebag  路  6Comments