pyroscope icon indicating copy to clipboard operation
pyroscope copied to clipboard

pyroscope.ebpf collect interval under 15s issue

Open luweglarz opened this issue 2 months ago • 3 comments

Describe the bug

When setting pyroscope.ebpf component collect_interval under 15s on alloy Pyroscope doesn't show similar interval on UI, I am not sure if it is the expected behavior. here is with 30s collect_interval Image and here is with 5s collect_interval Image

To Reproduce

1.Set pyroscope.ebpf collect_interval to a value under 5s 2.Check pyroscope UI intervals

Expected behavior

I expect to see profiles on the UI correlated to the collect_interval

Environment

  • Infrastructure: docker containers
  • Deployment tool: docker-compose

Additional Context

luweglarz avatar Oct 15 '25 09:10 luweglarz

We currently hardcode 15s as the lowest step interval, that's why you values 15s seconds apart, maybe you can make this configurable?

https://github.com/grafana/pyroscope/blob/38a40a93f921d7e66b0ef346d59e5d9dc28632bf/pkg/querier/timeline/calculator.go#L11

simonswine avatar Oct 17 '25 13:10 simonswine

That sounds doable, should it be configurable through the Querier config ?

luweglarz avatar Oct 17 '25 13:10 luweglarz

Yes, I've implemented it as a configurable option in the Querier config!

The changes add a --querier.min-step-duration flag (defaults to 15s for backward compatibility) that allows users to configure the minimum step duration.

Key changes:

  • Added MinStepDuration field to querier Config
  • Created CalcPointIntervalWithMinInterval() function that accepts custom minimum intervals
  • Updated all HTTP handlers to use the configurable value
  • Added tests covering eBPF use cases (1s, 5s intervals)

Users can now run: --querier.min-step-duration=5s for fast eBPF profiling intervals.

manab-pr avatar Oct 17 '25 15:10 manab-pr