Java CPU Profiling
Performance improvements in the Datadog Agent metrics pipeline | Datadog

Performance improvements in the Datadog Agent metrics pipeline | Datadog

1/31/2023 · Remy Mathieu

What this post added

This post details performance improvements in the Datadog Agent's metrics pipeline, specifically focusing on optimizing the computation of unique keys for metrics. The team identified a bottleneck in the original algorithm's sorting and deduplication of tags. They implemented several strategies: specializing the sorting algorithm based on the number of tags, switching to a faster hash implementation (murmur3), and optimizing map access with 64-bit keys. The most significant improvement came from redesigning the context generation algorithm to use XOR bitwise operations instead of merging hashes, removing the need for sorting. A custom hash set was introduced for efficient tag deduplication, avoiding the overhead of Go maps.

Read the original post ↗