logstash icon indicating copy to clipboard operation
logstash copied to clipboard

PQ: avoid deserialization cost (POC)

Open yaauie opened this issue 5 months ago • 4 comments

What does this PR do?

Avoids deserialization cost of events passing through the PQ when memory pressure is absent, by maintaining a list of soft-references to the events added to each PQ page. When constructing batches during reads, we use a new internal intermediate type BoxedQueueable, each of which holds either a strong-reference to a Queueable or the byte[] and deserializer necessary to construct it. Deserialization, if any, still occurs outside of the Queue locking mechanism.

Why is it important/What is the impact to the user?

Reduces the overhead of reading from a PQ when a pipeline is staying caught up with the workload.

Status

This is a proof-of-concept; actual implementation may change significantly. As a proof-of-concept spike, I did not take the time to arrange it into bite-size changes.

yaauie avatar Jul 14 '25 21:07 yaauie

:robot: GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

github-actions[bot] avatar Jul 14 '25 21:07 github-actions[bot]

This pull request does not have a backport label. Could you fix it @yaauie? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • If no backport is necessary, please add the backport-skip label

mergify[bot] avatar Jul 14 '25 21:07 mergify[bot]

:green_heart: Build Succeeded

elasticmachine avatar Jul 14 '25 22:07 elasticmachine