Changed ProfileAction to use an limit for profiles across rather than a per thread limit. (#12897)

Simplified Profile Action to have a per-process limit rather than a per thread limit which simplifies disk-filling concerns.

We want to prevent the profiler from filling the disk, and using a per thread limit creates more complexity and profiles (i.e. for the "global" limit would be #threads * limit per thread vs limit per process. The former is harder to reason about.

Signed-off-by: Kevin Baichoo <kbaichoo@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ faab20c8477827643ae2e22b25b28fef631f0d89
master-ci-test
data-plane-api(CircleCI) 4 years ago
parent 21ede2cb26
commit 1474050c22
  1. 9
      envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto

@ -25,11 +25,8 @@ message ProfileActionConfig {
// File path to the directory to output profiles.
string profile_path = 2 [(validate.rules).string = {min_bytes: 1}];
// Limits the max number of profiles that can be generated by a thread over
// its lifetime to avoid filling the disk. We keep a map of <tid, count>
// to track the number of profiles triggered by a particular thread. Only one
// thread is counted as triggering the profile even though multiple threads
// might have been eligible for triggering the profile.
// Limits the max number of profiles that can be generated by this action
// over its lifetime to avoid filling the disk.
// If not set (i.e. it's 0), a default of 10 will be used.
uint64 max_profiles_per_thread = 3;
uint64 max_profiles = 3;
}

Loading…
Cancel
Save