-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add presets for performance tuning to ES output configuration #3797
Comments
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
Would |
It would only show the preset with my proposed implementation above. This is because the expansion of preset into the individual parameters should happen in the sub-processes. In our case it would happen in Beats, and today I think having the presets pass through the agent and expand into parameters in the sub-processes is the correct approach, because it lets the parameters vary per sub-process. The |
Yes got it. we may end up (most likely) in scenarios where a policy has a mixture of current agents and otel based ones and the parameters will be different for each. That can't be managed at Fleet and needs translation at agent. |
I have questions about where some of the performance numbers are coming from, especially "stateful throughput" and "network traffic":
|
I believe @strawgate originally did these tests and can hopefully answer those questions. |
A smaller note: the only real difference between "default" and "latency" presets is that "latency" enables compression... but based on the benchmarks from the compression change, all else being equal, enabling compression increases latency (slightly), so if we were really optimizing for latency we would turn it off. |
IIRC the latency preset was meant to minimize latency but also be a quick way to go back to the defaults before elastic/beats#36990 since our original defaults were essentially optimized for latency. I think in general we want compression on everywhere by default to minimize data transfer costs, so I think we should leave compression enabled in the optimized for latency preset. This makes it more optimized for latency than the other presets, but it does not give the lowest achievable latency. |
Yeah, this is a bit confusing now, the "Default" table was from before we started down any defaults changes (including compression) and so represents the pre-8.11 defaults.
In all of my tests the bandwidth reduction for compression_level: 1 exceeded 90%. When running an actual agent with integrations and with the benchmark we did for cloud billing, both showed a 95% reduction in traffic. The beat benchmark catalogue shows a 70% traffic reduction but the logs it generates are pseudo-random (The first ~1/3rd or something of each line is made to look like an nginx log and the rest is filled-in with random ascii characters).
I think this is a typo and should be 0.1x as you've indicated.
Yeah I think we had originally measured this relative to the ES cluster and we probably need to grab new numbers from the benchmarks and update the throughput part of the table. |
Updated the issue based on the latest round of discussion:
|
Following on slack discussion: in the interests of making the 8.12.0 release, splitting the diagnostics-specific tasks into a followup issue since those features are for convenience rather than core behavior (the existing diagnostics already provide enough information to determine the effective config, even with presets applied). |
Adds the performance presets described in elastic/elastic-agent#3797 to the Elasticsearch output, configurable with the `preset` field.
Adds the performance presets described in elastic/elastic-agent#3797 to the Elasticsearch output, configurable with the `preset` field.
This is the agent side implementation issue for elastic/kibana#166870 to add support for output configuration presets.
After some discussion we believe the best path forward for implementing these presents is to keep the definitions of each preset in the agent, with Fleet only specifying the preset name. There are two reasons for preferring this approach:
Design
Presets will be selected by adding the
preset
key to Elasticsearch output in an agent policy. Initially the valid values for thepreset
key will be:balanced
,throughput
,scale
,latency
andcustom
.An example configuration is:
The actual rendering of the
preset
key into detailed output parameters should be as close to the output implementation as possible. The Elastic Agent should simply pass thepreset
key through to each supervised component. Since not all Elasticsearch output implementations are exactly the same, this allows the presets to vary depending on the implementation. The exact parameters forpreset: throughput
may be different for filebeat and endpoint-security for example. For Beats this means the rendering of the preset to detailed output parameters should happen in the Beat itself.When
preset
is configured the effective agent output configuration with all parameters must be inspectable for debugging. At minimum the full set of parameters and the preset they were generated from must be included in the output ofelastic-agent diagnostics
. For Beats this can be done in the existingbeat-rendered-config.yml
file or a new file generated from a new diagnostics hook as appropriate. It would additionally be nice if we could add anelastic-agent inspect output
command to show the rendered output configuration, but this can be done as a follow up since it will not be straight forward.Preset Definitions
When the preset is
custom
, the Fleet UI would be setting the parameters directly and there will be no need to render them at the agent in the manner done for the other presets.Acceptance Criteria:
preset
key in an agent output is passed through to each component (this should work by default with no changes).balanced
,throughput
,scale
,latency
, andcustom
presetscustom
.custom
is the only preset that respects user specified output tuning parameters.custom
. This ensures that agents upgrading to the version that introduces presets continue to work without modification.preset
types are rejected with an error.elastic-agent diagnostics
for each Beat.custom
.preset
key is documented in the defaultelastic-agent.yml
,elastic-agent.reference.yml
, the default configuration for each Beat, and the reference configuration for each beat. The default and reference configuration should set the preset tobalanced
. This is the intended default for new installations.The text was updated successfully, but these errors were encountered: