-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce profiles and the promscale profile
A profile is an optional "mode" to put the tuner in that tailors the recommendations for a particular workload. If no profile is specified, the tuner is run with a default profile which provides exactly the same behavior as before and corresponds to the typical timescaledb workload. The only other valid profile defined at the moment is "promscale". The profile is specified using either the `--profile` argument or the `TSTUNE_PROFILE` environment variable. The environment variable overrides the command line argument if the command line argument is set to blank. In this way, the environment variable can be passed to `docker run`, and we therefore do not need different docker images per profile. The promscale profile needs to make recommendations for a couple of postgres settings that are measured in units of time. This PR adds functionality to timescaledb-tune to be able to interpret and handle settings measured in time. This was not as straightforward as was hoped because how postgres interprets a setting's value depends upon: 1. whether the setting is a real or integer 2. the default units 3. whether units were specified in the input and whether those units are larger, smaller, or equal to the defaults 4. whether the input was a fractional value With the addition of profiles, it is possible for one profile to provide recommendations for settings which a different profile simply ignores. This PR had to provide a way for a Recommender to signal that it was providing "no recommendation" for a given setting. A SettingsGroup now returns an appropriate Recommender based upon the selected profile. A NullRecommender can be provided in the case that no recommendations are provided for the selected profile and SettingsGroup. A NullRecommender provides no recommendation for all settings passed to it. SettingsGroups can now have a mixture of settings that are measured in time, bytes, or unit-less. The FloatParser implementations and logic had to change to accommodate this.
- Loading branch information
Showing
25 changed files
with
1,607 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.