Skip to content
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

Documentation improvement: tuning the collector for stability & performance #11746

Open
djluck opened this issue Nov 25, 2024 · 2 comments
Open

Comments

@djluck
Copy link

djluck commented Nov 25, 2024

Problem

I've just spent a week tuning our deployed otel collectors to improve stability and performance. I've not seen any discussion around tuning best practices and I think the project could benefit from a document that outlines some recommend parameters.

Solution

Parameters I have in mind discussing include:

  • Setting max_recv_msg_size_mib for the OTLP receiver to be the value of the batch size most clients are using (should be 512 by default according to the docs) multiplied by the the expected maximum size of the message. For example, given a max expected message size of 100kib, we'd end up setting a recommend value of 512 * 100kib = 52mib (rounding up). Without this, it's easy for the collector to drop data when receiving large batches (max message size is only 4mib by default).
  • For clients with large maximum messages, setting send_batch_max_size in the batch processor to be big enough to match what clients are sending otherwise they'll see excessive splitting of batches. This seems to be very memory intensive: I observed a 5x memory utilization drop by changing send_batch_max_size: 250 to send_batch_max_size: 512:
    image
  • Enabling advanced compression (e.g. zstd) for collector to collector transmission, as otel collectors all support compression algos beyond gzip.
@mx-psi
Copy link
Member

mx-psi commented Nov 26, 2024

This may be useful to include at https://opentelemetry.io/docs/collector/scaling/, what do you think?

@djluck
Copy link
Author

djluck commented Nov 26, 2024

Thanks for the pointers- I can try my hand at writing an MR to add this detail 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants