The storage and retention of the JFR profile files are controlled by three main configurations defined in the base configuration section of the appropriate vars.yml file for your cluster.
Configuration
| Base Section | Default Value | Description |
|---|---|---|
| jfr_profiles_base_dir | /tmp | The base directory for storing all JFR profile artifacts. Ensure the directory has appropriate permissions. |
| jfr_max_profiles_stored | 15 | The maximum number of profile folders retained under the profiles base directory. |
| jfr_delete_profiles_on_breach | 5 | The number of the oldest profile folders to delete when the limit (set by jfr_max_profiles_stored) is exceeded. |
When the number of stored profiles exceeds the configured limit, Pulse automatically deletes the oldest folders based on the retention policy before saving new ones.
Example Scenario
Example Configuration
If the number of profiles limit is 5 and jfr_delete_profiles_on_breach is 2, every time a new profile arrives after reaching 5 profiles, the 2 oldest profiles are deleted, and the new one is added, keeping only the most recent profiles in the directory.
jfr_profiles_base_dir: /data/pulse jfr_max_profiles_stored: 5 jfr_delete_profiles_on_breach: 2Profile Retention Logic
Current state: /data/pulse/profiles = [id1, id2, id3, id4, id5] (
id1is the oldest,id5the newest)When a new profile (
id6) arrives:- There are already 5 profiles — adding one more exceeds the limit.
- Pulse deletes the 2 oldest profiles (
id1,id2). - Then it adds
id6. - ✅ Result:
[id3, id4, id5, id6]→ 4 profiles remain.
Next profile (
id7):- There are 4 profiles — still under the limit.
- Pulse just adds
id7. - ✅ Result:
[id3, id4, id5, id6, id7]→ 5 profiles.
Next profile (
id8):- Adding one more now exceeds the limit again (6 total).
- Pulse deletes the 2 oldest (
id3,id4). - Then it adds
id8. - ✅ Result:
[id5, id6, id7, id8]→ 4 profiles remain.
This logic ensures that the directory always keeps only the most recent profiles, automatically purging older ones when the defined limit is exceeded.