feat: agent - eBPF Add delay threshold check for push period #7607
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.
eBPF utilizes perf event's periodic events to push all data residing in the kernel cache. We have set this to push data from the kernel buffer every 10 milliseconds. This periodic event is implemented using the kernel's high-resolution timer (hrtimer), which triggers a timer interrupt when the specified time elapses. However, in practice, this timer does not always trigger interrupts precisely every 10 milliseconds to execute the eBPF program. This discrepancy occurs because timer interrupts may be masked off during certain operations, such as when interrupts are disabled during locking operations. Therefore, the timer may trigger interrupts after the expected time, resulting in latency for periodic events.
The system call phase will check the time delay of the push period, and if it exceeds this threshold, the data will be pushed immediately. From the tests, the maximum delay is approximately in the range of 30 to 60 milliseconds. Therefore, it is appropriate to set the threshold(
PERIODIC_PUSH_DELAY_THRESHOLD_NS
) for the system call phase check to 60 milliseconds.This PR is for:
Affected branches