Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
We have a customer who has so much traffic sometimes, that the cuckoo drop cache can't record the dropped IDs as fast as they're dropping them, so it's overrunning its input queue.
This is a frustrating single point of failure because there is a single goroutine responsible for filling this cache which means adding CPUs won't help, and because of trace locality, adding more nodes won't help when a burst of spans comes from a single giant trace. Making the queue larger just means that it will take a little longer to fill up.
The contention is that we write to the cache when we drop a trace, but we read from it for every span that arrives. So if you have a single huge trace, you might fairly quickly decide to drop it, but still have to query the cache tens of thousands of times for new spans. The cuckoo cache is pretty fast but we can make it faster.
Short description of the changes
genID
used by another benchmark, that I also wanted to use here, was broken so I fixed it.