Skip to content

[9.5](backport #51714) otel(tests): align BenchmarkFilebeatOTelThroughputMockES with presets#51898

Merged
mauri870 merged 1 commit into
9.5from
mergify/bp/9.5/pr-51714
Jul 13, 2026
Merged

[9.5](backport #51714) otel(tests): align BenchmarkFilebeatOTelThroughputMockES with presets#51898
mauri870 merged 1 commit into
9.5from
mergify/bp/9.5/pr-51714

Conversation

@mergify

@mergify mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

The current benchmark options don't reflect what Elastic Agent actually renders into otel-merged.yaml for a real deployment.

Turned the benchmark into a table test covering all presets, settings pulled from a 9.5.0 bb benchmark diagnostics bundles (otel-merged.yaml):

$ taskset -c 0-3 env GOTOOLCHAIN=go1.26.4 go test -tags integration -bench=BenchmarkFilebeatOTelThroughputMockES -benchtime=3x -run=^$ -timeout=10m ./x-pack/filebeat/tests/integration/...
goos: linux
goarch: amd64
pkg: github.com/elastic/beats/v7/x-pack/filebeat/tests/integration
cpu: Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz
BenchmarkFilebeatOTelThroughputMockES/throughput-4         	       3	1579533282 ns/op	      1337 bytes/event	     67049 events/sec
BenchmarkFilebeatOTelThroughputMockES/balanced-4           	       3	1711973699 ns/op	      1337 bytes/event	     59128 events/sec
BenchmarkFilebeatOTelThroughputMockES/scale-4              	       3	1702913293 ns/op	      1337 bytes/event	     59748 events/sec
BenchmarkFilebeatOTelThroughputMockES/latency-4            	       3	2402788519 ns/op	      1337 bytes/event	     39444 events/sec
PASS
ok  	github.com/elastic/beats/v7/x-pack/filebeat/tests/integration	23.100s

ES output presets for reference https://www.elastic.co/docs/reference/beats/filebeat/elasticsearch-output#_preset.

The total events processed by the benchmark are a multiple of the queue size, to avoid waiting on the flush timeout for the last batches which skews the benchmark numbers.

Also expanded the benchmark to have 3 filebeatreceiver instances, each in its own pipeline, with a beatprocessor (add_fields + add_host_metadata).

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

How to test this PR locally

go test -benchmem -run=^$ -tags integration -bench ^BenchmarkFilebeatOTelThroughputMockES$ -v -timeout=60s 
```<hr>This is an automatic backport of pull request #51714 done by [Mergify](https://mergify.com).

…#51714)

* otel(tests): align BenchmarkFilebeatOTelThroughputMockES with presets

The current benchmark options don't reflect what Elastic Agent actually
renders into otel-merged.yaml for a real deployment.

Turned the benchmark into a table test covering all presets, settings
pulled from a 9.5.0 bb benchmark diagnostics bundles:

  preset      mem queue (events/min_events/timeout)  exporter batch (max/min/flush)  conns/consumers/queue_size
  throughput  12800/1600/5s                           1600/1600/5s                    4/4/12800
  balanced    3200/1600/10s                            1600/1600/10s                   1/1/3200
  scale       3200/1600/20s                            1600/1600/20s                   1/1/3200
  latency     4100/2050/1s                             50/50/1s                        1/1/4100

The total events processed by the benchmark are a multiple of the queue
size, to avoid waiting on the flush timeout for the last batches which
skews the benchmark numbers.

Also expanded the benchmark to have 3 filebeatreceiver instances,
each in its own pipeline, with a beatprocessor.

Measured events/sec at different -cpu values (go test -bench=... -cpu=N).
At the host's full core count, results are dominated by the ES exporter,
batching, and I/O rather than processor CPU cost:

  preset      -cpu=32 (full)  -cpu=2
  throughput  ~97.6k          ~34.8k
  balanced    ~55.8k          ~33.9k
  scale       ~56.2k          ~33.5k
  latency     ~35.4k          ~26.6k

-cpu=2 approximates a throttled 4-core/cpu50 host, closer to the real
benchmark suite's methodology, and is where processor-side CPU
improvements are expected to actually show up in this benchmark's
numbers.

* reuse presets from es output

(cherry picked from commit d6a567b)
@mergify mergify Bot added the backport label Jul 13, 2026
@mergify mergify Bot requested a review from a team as a code owner July 13, 2026 15:54
@mergify mergify Bot requested review from belimawr and removed request for a team July 13, 2026 15:54
@mergify mergify Bot requested a review from orestisfl July 13, 2026 15:54
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 13, 2026
@github-actions github-actions Bot added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 13, 2026
@mauri870 mauri870 enabled auto-merge (squash) July 13, 2026 15:58
@mauri870 mauri870 merged commit 127a36e into 9.5 Jul 13, 2026
38 checks passed
@mauri870 mauri870 deleted the mergify/bp/9.5/pr-51714 branch July 13, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant